views:

686

answers:

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

+2  A: 

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
+3  A: 

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: http://stackoverflow.com/questions/1790/federated-synced-subversion-servers

Adam Haile
A: 

My apologies.

I searched through the site for subversion questions, but must have overlooked your question.

Thanks for the help.

kaybenleroll
+1  A: 

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.

Sean Carpenter