问题描述
好的.我使用 svn 的 hotcopy 进行增量备份,现在如何测试 hotcopy 是否能正常工作?
我在这里搜索了有关热复制的帖子.他们中的大多数似乎只是鼓励使用 svn hotcopy,但没有谈论如何使用 hotcopy 进行恢复.
关于如何使用我制作的热拷贝进行恢复有什么建议吗?
我还检查了 http://svnbook.red-bean.com/,但不能'真的找不到任何东西.
谢谢.
svnadmin hotcopy 将始终创建您的存储库的完整副本.无法使用 svnadmin hotcopy 进行增量备份.
svnadmin hotcopy 的工作方式类似于文件系统复制命令,除了它永远不会复制打开的事务.
要恢复存储库,您只需 svn hotcopy 将您的备份复制到您想要提供它的位置.
要检查存储库的完整性,请使用 svnadmin verify
例如:
假设您的 svn 存储库位于 /var/svn/repos 并且您的备份存储在 /var/backups/svn 和您的存储库 my_project强>坏了.
使用:
svnadmin hotcopy/var/svn/repos/my_project/var/backups/svn/
创建一个新的备份(每天或每周都这样做..)和:
svnadmin hotcopy/var/backups/svn/my_project/var/svn/repos/
恢复您的备份(注意:您必须先删除您的存储库,因为 hotcopy 不会覆盖您的旧存储库,您也真的应该查找存储库失败的原因).>
也可以使用:
svnadmin verify/var/svn/repos/my_project
用于检查存储库的完整性
Okay. I used svn's hotcopy to make incremental back-ups, now how do I test that the hotcopies will work properly?
I searched the posts here regarding hotcopy. Most of them seem to just be encouraging the use of the svn hotcopy, but not talking about how to recover using hotcopy once made.
Is there any advice about how to recover using the hotcopy that I've made?
I also checked http://svnbook.red-bean.com/, but couldn't really find anything.
Thanks.
svnadmin hotcopy will always create full copies of your repository. It is not possible to do incremental backups with svnadmin hotcopy.
svnadmin hotcopy works like a filesystem copy command, except it will never copy open transactions.
To restore a repository you can just svn hotcopy your backup to the place from which you want to serve it.
For checking the integrity of a repository use svnadmin verify
eg:
assume your svn repos are on /var/svn/repos and your backups are stored on /var/backups/svn and your repository my_project is broken.
Use:
svnadmin hotcopy /var/svn/repos/my_project /var/backups/svn/
to create a new backup (do this every day or week..) and:
svnadmin hotcopy /var/backups/svn/my_project /var/svn/repos/
to restore your backup (note: you have to remove your repo before, as hotcopy will not overwrite your old repo, also you really should look for the cause of your repository failure).
Also use:
svnadmin verify /var/svn/repos/my_project
for checking the integrity of your repository
这篇关于如何使用 SVN 热拷贝恢复存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!