[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problem using "svnadmin dump" in a cron job

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Sun, 20 Jul 2008 22:23:11 -0500

On Jul 20, 2008, at 22:09, Robert Dailey wrote:

> On Sun, Jul 20, 2008 at 9:21 PM, Ryan Schmidt wrote:
>> On Jul 20, 2008, at 12:28, Robert Dailey wrote:
>>> I'm currently using crontab to setup a backup script that runs at
>>> various intervals to backup my subversion repository. First, it
>>> performs an "svnadmin dump" as user 'root' in Ubuntu Server 8.04.
>>> Next, it utilizes the '7z' program to compress the dump file. I'm
>>> having an issue right now where the dump process will just cease to
>>> continue at any given random location in the dump process. For
>>> example, it might go all the way up to revision 26 and then stop
>>> there, instead of performing the dump for all revisions in the
>>> repository. The revision that the dump stops at seems to be random.
>>> <snip>
>> You should log the stderr output too, not just the stdout output.
>> This way
>> when an error occurs you should know why.
>> svnadmin dump /var/svn/repo/personal > ${filepath}.tmp_dump 2>&1
>>> echo "Dump process finished"
>>> if [ "$?" != "0" ]; then
>>> echo "Failed to generate dump file"
>> Usually you would print errors to stderr, not stdout.
>> echo "Failed to generate dump file" 1>&2
> Thanks for your help.
> I'm still new to linux & bash scripting, so please do forgive any poor
> scripts you see. I'll definitely make use of your suggestions, though.
> The 1>&2 syntax makes no sense, so I'll have to read about it after I
> write this.

"echo" sends its output to stdout. "1>&2" means "take what would be
output to file descriptor 1 (stdout) and instead send it to the
address of file descriptor 2 (stderr)".

> I'll try the suggestions you offered and see if I can figure out why
> it is failing. Thanks again.

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-21 05:23:49 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.