views:

2314

answers:

5

I am running a SVN server on my Windows Server and want to schedule an automated backup procedure. I will always be the only one working on the repository. Should I bother with hotcopy or can I use a simple Windows backup application to backup the repositories? What about xcopy or robocopy?

A: 

I use Mozy Home to back up all of my personal development files (Subversion, Visual Studio projects, etc.) It's simple, doesn't take up too many resources, is easily configurable, and best of all: free.

I thought about writing my own backup solution using xcopy or something similar, but why reinvent the wheel?

JustinT
+2  A: 

As long as you are sure that no one is accessing (especially committing to) the repository while it is being backed-up, there is no need to use hotcopy. You can simply copy/backup the repository with any tool you want.

M4N
For an automated process, that condition isn't very robust; I'd use hotcopy or dump myself.
Marc Gravell
Marc, that's certainly true, I'm using hotcopy too. But Dscoduc explicitly stated that he well always be the only person to work on the repository - so it should not be a problem.
M4N
+9  A: 

I find simply copy / pasting (XCopy) the repositories is the easiest solution. You may want to consider dumping the repository to a single file before you copy it as I find copying a single large file is much quicker than copying a bunch of smaller files. This probably isn't an issue if your repository is small, but something to consider:

svnadmin dump /path/to/repository > repository-name.dmp
Ryan Smith
+2  A: 

Kind of duplicate SVN backups..is hotcopy enough or should I worry about full and incremental dumps? question.

Do not forget to think about:

  • the frequency of your backups (what happens if it crashes between two backups ?)
  • the cleaning process (how many backups do you want to keep over time ?)
  • the free space management (what kind of disk space each backup takes ?)
  • the restore procedure: TEST it ;) A backup which has never been tested is not a "real" backup ;)
VonC
+1  A: 

You would be OK as the only user, since you know you would never be committing a change during the backup, (right? :) Still, there doesn't seem to be any "bother" in using hotcopy or dump. They're just as easy to use.

Plus you get two bonuses if you use it. One is if your situation changes (you get more people using your repository) you don't have to remember and go back and change the way you do it. And two is, if there is ever a problem with restoring, you don't really want to post a question that starts with, "I made my backup by just making copies of the repo..."

gbarry