views:

374

answers:

5

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 Visual SVN Server) and have Visual SVN Server read the repository from a completely different machine.

We'd backup the location we point the Visual SVN 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.

A: 

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

Cem Kalyoncu
A: 

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.

crashmstr
+2  A: 

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).

Martin v. Löwis
CoffeeAddict
@coffeeaddict: a regular backup may save an inconsistent repository, so that at restore time, you find that your repository is broken. This may happen if a commit was in progress at the same time when the backup was running, and both processes where accessing the same files in an unfortunate manner.
Martin v. Löwis
Looks like if using FSFS, I'm good to go with simply backing up the entire Repositories folder.
CoffeeAddict
A: 

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.

Jim T
A: 

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

phsr
I don't see why you'd have to use a dump if you're backing up the Repository folder using a backup program like Veritas on a windows OS.
CoffeeAddict
We aren't running veritas, and since we are using Apache with SVN to allow for domain authentication, we ran into problems with disk corruption if we backed up the repositories without shutting down Apache/SVN. To prevent down time, we used dump, and we keep a weeks worth of backups on the server.
phsr