4

What is the best way to create redundant subversion repositories?

I have a subversion repository (linked through apache2 and WebDAV) and would like to create a mirror repository on a different server in the event of outages, but I am not certain of the best way to proceed.

I am thinking that post-commit scripts could be used to propagate changes, but I am not sure if this is the best way to go, anyone have any input

Community
  • 1
  • 1
kaybenleroll
  • 16,794
  • 16
  • 54
  • 66

3 Answers3

4

Sounds like what you are looking for is basically federated (synced) servers... I asked the same question recently...and while I didn't find the exact solution I was looking for it came close. See here:

Community
  • 1
  • 1
Adam Haile
  • 30,705
  • 58
  • 191
  • 286
2

Do you really need per-commit back-ups? There are almost certainly better ways of safe-guarding against failures than going down that route. For example, given that most failures are disk failures, move to a RAID array and/or NAS/SAN storage will provide you with better general protection and, if configured correctly, better performance. At that point, off-site back-ups becomes a matter of using the tools available. See the Repository maintenance section of the svn manual for details.

If you truly do need per-commit back-ups then, yeah, post-commit scripts are the way to go.

GaryF
  • 23,950
  • 10
  • 60
  • 73
1

If you only need read-only access to the mirrored repository, you can use svnsync which was added in SVN 1.4 for mirroring.

We use a secondary repository on our build server to run CruiseControl.NET against, but the mirrored repository is read-only.

Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199
Sean Carpenter
  • 7,681
  • 3
  • 37
  • 38