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

Re: Keeping a hot/live FSFS repo for failover

From: Kyle Kline <kyle.kline_at_gmail.com>
Date: 2006-10-30 22:20:10 CET

Thank you. It wound up being a permission issue. Post-commits are working
100%.

I am using this for web content authoring in an HA scenario for authoring --
the final solution is as follos:

Hardware load balancer pointing traffic of http://dav/ to SVN/Apache on
BoxA.

Web site served by both BoxA and BoxB, load balanced for HA.

On each commit, a post-commit on BoxA:

   - asynchronously fires an svnsync sync http://dav-backup/ to Box B
   (no commits are allowed to dav-backup url save the svnsync stuff)
   - asynchronously fires an "svn update" to a working copy on Box A that
   serves a web site

Post-commit hook on Box B (triggered by svnsync commits from Box A):

   - same async "svn update" to working copies of on Box B (in practice,
   working copy on Box B is updated less than 0.25 seconds after commit
   to repo on BoxA)
   - synchoronously does a dump file append to a back up dump file (hit
   of appending is not taken by primary commits/user)

In a failure scenario, repoints traffic of http://dav/ to BoxB. One manual
step to change the revprops file on rev 0 on Box B, but other than that,
pretty seamless.

In restoration, run an svnadmin hotcopy to restore repo to Box A, repoint
http://dav/ to Box A, restore revprops:0, and everyone is on their happy way
again.

On 10/30/06, Garrett Rooney <rooneg@electricjellyfish.net> wrote:
>
> On 10/30/06, Kyle Kline <kyle.kline@gmail.com> wrote:
> > Thanks all for the responses. SVNSync works well for this purpose.
> >
> > A quick Q though -- I notice that when locally run on the mirror side
> > (backup repo server), the svnsync also seems to run the post-commit
> script
> > hook (desired behavior for me, I append to a dump file) -- ie
> > svnsync sync file:///c:/svn/myrepo
> >
> > However, if I trigger the sync from the primary (like in a post-commit),
> the
> > post-commit script does not seem to be run on the remote mirror box --
> ie
> > svnsync sync http://svnbackup.domain.com/myrepo
> >
> > Any thoughts? Or is that for a separate thread?
>
> It should always be running post-commits on the destination
> repository, svnsync uses exactly the same mechanism to do the commit
> as svn does, there should be no difference.
>
> -garrett
>
Received on Mon Oct 30 22:21:05 2006

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.