如何使用 SVN 热复制恢复存储库?
好的。我使用svn的hotcopy来进行增量备份,现在如何测试hotcopy是否能正常工作?
我在这里搜索了有关热复制的帖子。他们中的大多数似乎只是鼓励使用 svn hotcopy,但没有谈论如何使用 hotcopy 进行恢复。
关于如何使用我制作的热副本进行恢复有什么建议吗?
我还检查了 http://svnbook.red-bean.com/,但找不到任何事物。
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果有人正在寻找答案,这里是恢复热副本的另一种选择。安装 Visual SVN Server:-
Here is another alternate to restoring a hotcopy if someone is looking for an answer. Install Visual SVN Server:-
svnadmin hotcopy 将始终创建存储库的完整副本。无法使用 svnadmin hotcopy 进行增量备份。
svnadmin hotcopy 的工作方式类似于文件系统复制命令,但它永远不会复制打开的事务。
要恢复存储库,您只需将备份 svn 热复制到您想要提供服务的位置即可。
要检查存储库的完整性,请使用 svnadmin verify
例如:
假设您的 svn 存储库位于 /var/svn/repos 上,并且您的备份存储在 /var/ 上backups/svn 和您的存储库 my_project 已损坏。
使用:
创建一个新的备份(每天或每周执行此操作..)以及:
恢复您的备份(注意:您必须之前删除您的存储库,因为热复制不会覆盖您的旧存储库,您也真的< /em> 应该查找存储库失败的原因)。
也可用于:
检查存储库的完整性
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:
to create a new backup (do this every day or week..) and:
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:
for checking the integrity of your repository
您只是在寻找烟雾测试吗?只需将任何客户端指向它(直接在计算机上,如果需要,可以使用 file:// 协议)并进行一些检查 - 这些文件构成一个有效的存储库。热复制只是为了确保您获得一致的副本(例如,在热复制期间发生的签入不会搞砸备份)。
Are you just looking for a smoke test? Just point any client at it (directly on the machine, with the file:// protocol if you want) and do some checkouts- the files constitute a valid repo. The hotcopy is just to make sure you get a consistent copy (eg, checkins that happen during the hotcopy don't screw up the backup).