How to recover from svn hotcopy backups

前端 未结 4 950
醉话见心
醉话见心 2021-02-07 18:05

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 histo

相关标签:
4条回答
  • 2021-02-07 18:37

    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

    0 讨论(0)
  • 2021-02-07 18:39

    "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.

    0 讨论(0)
  • 2021-02-07 18:43

    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.

    0 讨论(0)
  • 2021-02-07 18:47

    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.

    0 讨论(0)
提交回复
热议问题