You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Oliver Marshall <Ol...@g2support.com> on 2011/01/21 09:57:34 UTC
Live replication to backup server
Hi,
Does anyone know of any manageable way to have SVN (Ubuntu 8 LTS currently) replication all changes to a secondary server?
Im toying with using Rsync but I'd prefer to use a hook in SVN ideally to ensure that we only copy files when they are fully checked in.
Olly
Re: Live replication to backup server
Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, Jan 21, 2011 at 3:57 AM, Oliver Marshall
<Ol...@g2support.com> wrote:
> Hi,
>
>
>
> Does anyone know of any manageable way to have SVN (Ubuntu 8 LTS currently)
> replication all changes to a secondary server?
Use post-commit to fire off a command to "svnsync" on the secondart
server. This doesn't mirror configurations, but you don't want to do
that anyway: the second server should be locked down to prevent local
changes, out of sync with the primary server.
Rsync is dangerous because if you do it in post-commit, it's
non-blocking and other changes may be submitted while the change is
occurring and cause chaos in the remote repository. The same problem
exists with mirroring *any* database: the mirroring step needs to be
atomic.
Alternatively, consider switching to a distributed source control
system where merges to disparate repositories are more effective.
Re: Betr.: Live replication to backup server
Posted by Stefan Sperling <st...@elego.de>.
On Fri, Jan 21, 2011 at 10:05:02AM +0100, Jan Keirse wrote:
> Oliver Marshall <Ol...@g2support.com> schreef op 21/01/2011
> 09:57:34:
>
> > Hi,
> >
> > Does anyone know of any manageable way to have SVN (Ubuntu 8 LTS
> > currently) replication all changes to a secondary server?
> >
> > Im toying with using Rsync but I?d prefer to use a hook in SVN
> > ideally to ensure that we only copy files when they are fully checked
> in.
>
>
> Subversion comes with a tool for that:
> http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svnsync
Make sure to read about this issue before using svnsync:
http://subversion.tigris.org/issues/show_bug.cgi?id=3546
The svnsync setup as described in the book will work properly in
Subversion 1.7 (not released yet). Until then, a race condition has
to be worked around. See http://svn.haxx.se/users/archive-2011-01/0291.shtml
for the workaround.
Stefan
Betr.: Live replication to backup server
Posted by Jan Keirse <ja...@tvh.be>.
Oliver Marshall <Ol...@g2support.com> schreef op 21/01/2011
09:57:34:
> Hi,
>
> Does anyone know of any manageable way to have SVN (Ubuntu 8 LTS
> currently) replication all changes to a secondary server?
>
> Im toying with using Rsync but I?d prefer to use a hook in SVN
> ideally to ensure that we only copy files when they are fully checked
in.
Subversion comes with a tool for that:
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svnsync
Kind Regards,
JAN KEIRSE
ICT-DEPARTMENT
Software quality & Systems: Software Engineer
**** DISCLAIMER ****
http://www.tvh.com/newen2/emaildisclaimer/default.html
"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."