Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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:?

like image 314
nonopolarity Avatar asked Jan 30 '26 01:01

nonopolarity


2 Answers

You have a number of options:

  • svnadmin hotcopy: http://svnbook.red-bean.com/en/1.2/svn.ref.svnadmin.c.hotcopy.html

  • svnadmin dump and svnadmin load: http://svnbook.red-bean.com/en/1.2/svn.ref.svnadmin.c.dump.html

  • svnsync to create a read-only mirror of your repository: http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt

like image 187
Jon Avatar answered Jan 31 '26 18:01

Jon


check out the

svnadmin dump

command. http://svnbook.red-bean.com/en/1.1/re31.html

like image 41
Aaron Avatar answered Jan 31 '26 17:01

Aaron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!