Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the point of a read-only copy of your repository via svnsync?

Tags:

svn

svnsync

I've been reading up on svnsync to create a read-only copy of our repository, but I don't really understand what the point of having a read-only copy of the repository is. If the master goes down for some reason can the read-only copy become read/write so people can commit to it? If not, then what's the point of a read-only copy?

like image 766
darrickc Avatar asked Aug 12 '10 21:08

darrickc


2 Answers

Read-only repositories maintained by svnsync are typically set up to provide near real time backup of a master repository. The copy is considered read-only because making changes to it by means other than svnsync will prevent svnsync from working properly.

In the situation that your main repository is lost, your backup repository can become the new master. For all practical purposes the copy is identical to the original master as of the last run of svnsync. You could rebuild the original repository by copying the files from the backup repository and continuing as before.

Alternatively, clients with working directories based on the original master can perform an svn switch --relocate operation to update the server URL to point to the copy and continue working without a hitch. Of course once clients start using the backup to make commits then it can no longer be the target of svnsync commands and effectively becomes a new master repository and you'll want to create a new backup.

like image 54
ChrisH Avatar answered Sep 28 '22 14:09

ChrisH


Assuming you're talking about your own private repository, two reasons for a read/only copy of anything - a database or a source code repository or xyz - are to relieve load and improve performance.

If you're running any kind of analytics over your repository, say a process that touches every revision, then this might place a high load on your main repository, degrading performance for developers. Syncing a read/only copy is a way to relieve that load, allowing you to get the job done without causing degredation for key users.

A similar argument can be made over latency - easier to pull down from a local read/only copy (essentially a cache) than to pull from another office over a VPN or similar link.

like image 26
Bevan Avatar answered Sep 28 '22 16:09

Bevan