At this moment we are using Visual SVN and we are backing up the entire repositories directory for visual svn. This backs up the entire data for each repository inside our svn engine. I am curious if I will be able to restore those files in case of an emergency or a disaster? Any of you have experience with this restoration procedure? Thanks.

link|improve this question

40% accept rate
feedback

5 Answers

up vote 5 down vote accepted

See: http://www.visualsvn.com/support/topic/00012/

That points to the following documentation:
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.backup

It describes using the subversion commands to take the backup. I hope this is what you are doing already because taking a straight directory backup can result in having a non-usable repository.

You should be able to use the backup from the subversion backup command to restore the full repository. However, as with any backup strategy, you must test the restoration yourself to be sure it works for you.

link|improve this answer
feedback

The easiest and best way to make backups of a SVN repo is to use svnsync. Its an incremental tool that replays any commits to a backup repository. Its easy to get going - see this blog post - and its fast as it only sends changes. You will have to set up a post-rev-prop-change hook to catch the 'edge case' of when someone updates a historical revprop, but otherwise you can run it hourly (as I do) to keep backups continually. you can even run it in the post-commit hook if you're really paranoid about data backup!

If your live repo dies, you can then just "svn relocate" to the backup repo until you have your live one running again (though, be careful if you write anything to the backup whilst the live is down unless you run svnsync to get those changes applied to the live repo, which is pretty obvious when you think about it).

So you have continuous backups, and downtime measured in seconds using it with minimal resource usage. Backups don't get much better than that!

link|improve this answer
feedback

Another option is hotcopy. It makes a back up of your entire repository. Takes up more disk space, but very easy to run and also very easy to restore repository using this.

link|improve this answer
feedback

I'm doing it by:

svnadmin dump "c:/Repositories/svnroot" > c:/backup/svnroot_%date%.dump

Also you can rar/zip it to save space. I was using the same method when I moved SVN from Linux to VisualSVN, so this backup works as it should.

link|improve this answer
feedback

VisualSVN is a Windows product so it'll be running on Windows. If the backup utility is able to use Volume Shadow Copy to make the backup, then that should produce an internally consistent backup. The built-in NTBACKUP or third party software such as Symantec Backup Exec, or the disk-based backup tools built into Windows Server 2008 are all capable of using Volume Shadow Copy.

link|improve this answer
This won't be transactionally sound. You need to get the server to do the backup one way or another, just as you do for any database. – David Heffernan Dec 5 '11 at 13:01
In the case of SQL Server, then VSS-based backups are in fact transactionally safe. In the case of VisualSVN server, one would hope that as a Windows based server, it would behave correctly when backed up by one of the standard windows backup solutions, as SQL Server does. I have no evidence to suggest whether it does or does not. – Tim Long Dec 5 '11 at 22:08
I doubt it. VisualSVN is simply svn packaged up. I've never seen any indication that it has backup that integrates with VSS. – David Heffernan Dec 5 '11 at 22:12
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.