Search code examples
svnsynchronizationsvnsync

SVN synchronization between multiple repositories


We are using SVN and we have on-site and off-shore teams. SVN repository is currently in on-shore premises which means that connectivity from off-shore to SVN is very slow. We would like to setup and SVN at off-shore too. We would require the two SVN repositories to be in-sync. What would be the best practice to do this, any third-party product required?

Thanks!


Solution

  • Here you will need to setup an SVN master-slave setup.

    Basically:

    • The slave server has his own local repository and can serve local read requests
    • Write requests to the slave server have to get forwarded to the master server (using WebDAV proxy or post-commit hooks, I would go with the second one)
    • The slave repository has to be synchronised with the server's repository (using svnsync)

    This blog post is a good starting point if you prefer to use WebDAV, while this post will show you how to setup a synchronisation using post-commit hooks.

    Note that you will also have to modify the default pre-revprop-change hook script on your slave server as svnsync will need to modify some properties directly.