Creating Redundancy for a Subversion Repository?
-
08-06-2019 - |
Question
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
Solution
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:
OTHER TIPS
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.
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.