Search code examples
svnbackupvisualsvn

what is the best way to back up an SVN server for all the code and content?


is there a good way to back up all the code and content on an SVN server? because if that hard drive dies, then all work can be lost.

i think if we use multiple computers to SVN Update to it regularly, the most of the files are present on those machines, and therefore the code are somewhat safer not to be lost.

i was also thinking of writing a script to copy the c:\repositories to w:\, which is a 2TB external hard drive that is mostly idle during the day. the copy process can be run nightly by cron or windows scheduler... but will copying everything be an overkill? it may be a dozen files that got changed during the day, which total to be 0.5MB, and copying the whole repositories may involve 50MB or more. and what if i was doing SVN check-in while that cron job is running. won't those files be in an inconsistent state?

or what about have the repository at c:\ so that SVN update is fast (the w: drive need time to wake up if idle for too long), and then just create a project under w:\ and check out all files to w:\all_code and it will SVN update to the whole repository, and then run cron jobs to SVN update w:\ to sync to the repository every night, so that an extra copy of all the files are on w:?


Solution

  • You have a number of options: