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

Re: svn-fast-backup: return value differentiation between serious failure and existing revision?

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 24 Mar 2010 10:36:23 +0100

On Wed, Mar 24, 2010 at 09:43:28AM +0100, Johannes Graumann wrote:
> Hi,
>
> I'm scripting the nightly backup of my subversion repositories via 'svn-
> fast-backup'. I started out summing up the return values of all invocations
> in the script, intending to trigger an email if the sum is != 0, which means
> I would have to have a closer look. This strategy is problematic though, as
> 'svn-fast-backup' also returns 1 if the repository wasn't modified since the
> last backup and 'svn-fast-backup' exits with the message that the last
> existing revision is already backuped - which is not a "real" problem at
> all.
> Can anyone point out a strategy on how to distinguish whether 'svn-fast-
> backup' shut down for this benign reason or for something serious?

Sounds like a misfeature/bug of that script.

Can you submit a patch that makes exit 0 even if the repository
hasn't changed since? I guess doing that is the best solution.

If that is not an option, a scheme like the following should work:
exit 0 -> everything fine
exit 1 -> repository hasn't changed since last run
exit anything greater 1 -> a real error has happened

Thanks,
Stefan
Received on 2010-03-24 10:37:08 CET

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.