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

Re: Looking to dump/load with minimal repository downtime

From: Andy Levy <andy.levy_at_gmail.com>
Date: Mon, 18 Aug 2014 21:17:00 -0400

Why risk the race condition at all? Use svnsync to populate a new
1.8-format repository, install the requisite hook scripts to replay
the transactions coming into the old repository into the new one, then
switch your server's configuration to point at the new copy when
you're ready to cut over.

http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html#svn.reposadmin.maint.replication

On Mon, Aug 18, 2014 at 7:43 PM, Eric Johnson <eric_at_tibco.com> wrote:
> 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 03:24: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.