[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: Mark Clements <gmane_at_kennel17.co.uk>
Date: 2007-04-25 17:29:49 CEST

Great - that script works brilliantly. Had to correct a typo (#SVN_VAR ->
$SVN_VAR) but it now works like a charm.

Thanks a lot!

- Mark Clements

"Johnathan Gifford" <jgifford@wernervas.com> wrote in message
news:462F22FF.158F.00BE.0@wernervas.com...
> 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 17:30:33 2007

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.