Our current backup process is doing a SVN HOTCOPY every night, to a backup location on a different machine. Can I somehow recover from that backup and retain all revision history? Or do I need to use the svn dump/load?
Thanks, Chandrajeet
"svnadmin hotcopy" actually copies the entire repository to another location. The copy is indistinguishable from the original repository, and can in fact be used as a repository itself. So, you should be able to copy the results of svnadmin hotcopy back to your repository location and have a perfectly valid, restored repository.
The advantage of hotcopy over a regular filesystem copy is that it respects Subversion's locking mechanism.
As part of your daily backup, you might want to run svnadmin verify <REPOSITORY>
You could either verify the original or the hotcopied.
Definitely do that before restoring from a backup.
I would do much more then simply run a hotcopy every night. I would use "svnadmin dump" to create a history of revisions into a dumpfile, which can be restored to a working repository.
You should be backing up these dumpfiles to tape or offsite disk as is standard backup procedure. If a corrupt repository persists over several days before it is caught (such as on a weekend or holiday), you can go back to the last good file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With