Question

Does anyone store their Repositories folder on a network drive that's backed up? Is there any issues anyone's had with that as opposed to lets say keeping it stored on the host server that is running Subversion's C drive?

We essentially want to put our repo on another network drive (different than the server running VisualSVN Server) and have VisualSVN Server read the repository from a completely different machine.

We'd backup the location we point the VisualSVN Server to every 5 minutes so that the SVN repository folder would be backed up at any time a failure occurs. Then we most likely would not have to worry about then merging any latest changes from developers back into a stale/outdated repo number because we back it up so frequently.

Was it helpful?

Solution

The subversion FAQ has a discussion on storing repositories on NFS; basically, you must use the fsfs backend in this case. Using fsfs is also necessary for hot backups of the repository; for bsdfs, you would need hot-backup.py (or svnadmin hotcopy). With a regular backup program, it may happen that the "current" file points to a revision that is not yet fully copied at the time of backup. "svnadmin recover" can fix that should you have to restore a backup where this happened (or else make sure that "current" is backed-up before any of the revision files are).

OTHER TIPS

Hopefully, you are using something other than the file:// protocol!

It should be ok in general if the backups are occurring during off hours.

Check out the Repository Backup topic in the SVN Book.

I put my repo on web server which is backed-up regularly and used mod-svn for apache.

We had our repositories set up like this at one point, but moved the repositories to a server, and before the server is backed up, we perform a dump and backup the dump file. We use dump, since the file format will always be supported and the repository can be recovered from nothing, where as hotcopy depends on the repository structure being the same

Be careful, a simple naive copy of the repository is not guaranteed to give you a valid backup unless the svnserver has been stopped. It may be annoying to stop your server every 5 minutes for a backup.

Make sure you're using svnadmin hotcopy, not just a SAN snapshot or copy command.

Also, you can run scripts in the post commit hook to do backups when something's actually changed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top