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

Re: svnadmin verify

From: Johnathan Gifford <jgifford_at_wernervas.com>
Date: 2007-04-25 16:45:33 CEST

> One further question - is there any way you can think of for the script to
> get the revision number of the bad revision? It's not a massive issue, as it
> will need manual intervention anyway and you can check then, but it might be
> a useful thing to send in the error output, if possible.

The revision that is bad is next unverified revision. So in your example:

> $ show_exit_code "svnadmin verify ."
> * Verified revision 0.
> * Verified revision 1.
> * Verified revision 2.
> svnadmin: Missing node- id in node- rev
> Exit Code: 1

Revision 3 would be the bad revision. However this doesn't mean that revision 4 or 15-20 are not bad also. With svnadmin verify, there is no way to tell. Only doing an incremental dump on each revision would tell you there is a problem.

This is the script I use to cron with:

#!/usr/bin/bash

SVN_HOME=/path/to
SVN_VAR=/some/place/for
SVN_BIN=/where/svn/is/installed

find $SVN_HOME/repositories/* -type d -prune |
while read i
do
        $SVN_BIN/svnadmin verify $i > #SVN_VAR/logs/svn-verify-`basename $i`.log 2>&1 || {
                tail $SVN_VAR/logs/svn-verify-`basename $i`.log | mail -s "svn verify: `basename $i` FAILED: `hostname` `date`" your_address@some.domain.com
        }
done

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 25 16:46:19 2007

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