How can I do daily backups for my VisualSVN Repos?

Its on a Windows Server 2003 machine with VisualSVN Server, I was thinking about just doing an xcopy of the folder C:\Repo but I'm not familiar enough with svn to know if that will cause issues.

Should I use dump or hotcopy or both?

link|improve this question

feedback

2 Answers

up vote 6 down vote accepted

It's a bunch of files, like any other bunch of files. Use whatever method you use to backup the rest of the system. As this is on a server I would have thought it would already be included in the regular backup scheme.

If you're using half-decent backup software, even Windows own NT Backup, it should be using the Volume Shadow Copy service, which will take care of open file issues, if any.

link|improve this answer
Did you mean "like any other bunch of files" ? – Tim Long May 28 '10 at 22:03
@Tim Long - Rectified. I think I may have intended to write "not unlike". If you see this sort of thing in my questions or answers please feel free to edit them. – John Gardeniers May 28 '10 at 23:04
Would have edited, but only having a 'mere' 694 rep is not enough to edit. – Tim Long May 29 '10 at 20:42
It may be "a bunch of files" but those files are interdependent and cannot be copied instantaneously. Which could cause a "faulty backup". See my answer for the SVN documented solution. – Byran May 31 '10 at 4:07
1  
@Bryan, VSS should take care of the interdependence issue because it effectively takes a point in time snapshot prior to the backup. I certainly haven't experienced any issues doing my backups (and test restores) that way. – John Gardeniers May 31 '10 at 4:31
show 1 more comment
feedback

Just copying the repo files is a bad idea:

...unless you temporarily disable all other access to your repository, simply doing a recursive directory copy runs the risk of generating a faulty backup.

You should use the The svnadmin hotcopy command.

Repository Maintenance > Repository Backup

You could script this and run it as a scheduled task.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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