Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an svn repository and I'd like to have it duplicated over multiple machines for availability purpose. By now when my vps goes down, I'm unable to connect to repository and this is very annoying. Easiest (and expansive) solution is to setup two identical machine and make them work like clones. I'd like to know if there are any alternative (involving 2 machines). Ideally I would have two vps in different datacenters, so if one goes down I can rely on the other. Thanks.

I need a mirror both for read and write not only for read.

Svn Repos are berkley-db based

share|improve this question
While having a backup repo is a great idea, it sounds like you really ought to be changing to a VPS host that doesn't go down this often. – EEAA Nov 12 '12 at 14:52
...Or perhaps switch to a decentralized solution like GIT. – Chris Nava Nov 12 '12 at 15:04
@EEAA I'm already looking for another host, but even the most affordable one would be affected by this issue, so I'm interested anyway in a working solution. – cardy Nov 12 '12 at 15:20
@Chris Nava. I've something like 50 projects on svn and by now switching to GIT is not an option :( . – cardy Nov 12 '12 at 15:21
@cardy I'm afraid you aren't going to find one. Such a feature would need to be built into the SVN server for it to be supported. – Chris Nava Nov 12 '12 at 20:41

You can think about at least some different solutions for your trouble (not asked question)

  1. As requested, RO SVN-mirror (1 instance) you can build with svnsync (ASF doc for it)
  2. You can rebuild any amount of mirrors (maybe even RW) with svnadmin (dump|load)|svnrdump - with a lot of handwork
  3. If your repository is FSFS, you can use any tool for creating remote copy of FS-tree, which forms repository (rsync is good choice, maybe scp)
  4. You can use locally SCM (DVCS), which have SVN-bridge and work with local repository while SVN is offline and synchronize when it become online (Git+git-svn or Mercurial+hgsubversion)

Solution 3 in details

From FS(FileSystem)-view SVN-repository is just subtree in filesystem. If you'll create and start new SVN-server in any additional location (using svnserve --root or Apache with SVNParentPath - it does not matter) any data, which appeared inside repo-root nd looks at the structure as a repository, will be served as repository. You have only to find method to transfer files from one location to another

share|improve this answer
Thanks for your fast insights. #1 is not what I really need. #2 I've thought about it before asking for a solution and you're right it require a lot of handwork. Can you clarify a bit #3?It seems interesting to me. – cardy Nov 14 '12 at 10:32

You can checkout the WANdisco Subversion solution, it does this kind of Subversion repo cloning for HA/DR purposes.

share|improve this answer
Interesting but is a commercial (non free) solution, isn't it? I'll leave it as last chance, by now I'm looking for some opensource and free solution (if any). Thanks btw. – cardy Nov 14 '12 at 10:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.