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

Looking to dump/load with minimal repository downtime

From: Eric Johnson <eric_at_tibco.com>
Date: Mon, 18 Aug 2014 16:43:27 -0700

Just upgraded my server from 1.7 to 1.8.

Now looking to do a dump and load of all the repositories hosted on the
server.

I've got a crazy idea for minimizing downtime - since the servers are *not*
being constantly bombarded with commits, I'm thinking that I can just do a
dump/load on the fly, and see if any commits came in while the dump was
happening, and if they did, try the dump again.

That is:

STARTREV = `svnlook youngest repodir/$REPONAME`
svnadmin create reload/$REPONAME
svndump repodir/$REPONAME | svnadmin load reload/$REPONAME
ENDREV = `svnlook youngest repodir/$REPONAME`
if "$STARTREV" == "$ENDREV"; then
  mv repodir/$REPONAME older/$REPONAME
  mv reload/$REPONAME repodir/$REPONAME
fi
# and if the above didn't match, repeat the above until success.

There's the tiniest bit of a race condition at the very end. But is it safe
to do an svnadmin dump on a live repository?

Eric.
Received on 2014-08-19 01:44:18 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.