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
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.
Thanks for the reply. i am worried for that situation if a corrupted repository gets backed up over a clean repository in the backup location. though I take circular backups from Monday till Friday, I fear for the above situation.
What is svnadmin recover for? As my repository is on a fsfs system, i guess "svnadmin recover" is of no use.
Regards,
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.
may be you want to look into my answer to a similar question: "Restore SVN backups from multiple files"
You should also think about a strategy for recover your SVN-workingcopies: if you just recover an hotcopied(or dumped) repo all workingcopys which are on a higher revision will be invalid and the developers have to check out again. usually this takes much more time to be again on track than recovering the repo alone.
The problem on dumps is: they are very time consuming to create and to play back.
Also if you use hook scripts they will be included in your hotcopy, but they will not be inside your dumps.
Thats said I would recomend a combination of hotcopy and per-commit dump