我可以使用精确的文件副本在计算机之间复制 SVN 存储库吗?
我在 Windows 机器上有一个大型存储库。我想将整个存储库复制到另一台机器上,最好不要通过“转储”或使用 svnsync。如果我可以保证在复制过程中不会更改任何文件,我是否可以使用传统文件复制技术在第二台计算机上简单地进行精确的文件复制?
I have a large repository on a Windows machine. I would like to copy this entire repository on to another machine, ideally without going via 'dump' or using svnsync. If I can GUARANTEE that no file is changed during the copy process, can I simply make an exact file copy on the second machine using tradition file copying techniques?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您使用 Berkeley DB 存储库存储,那么您确实需要非常小心 - 包括版本匹配,甚至操作系统。但是,如果您使用快速安全文件系统(FSFS,目前是所有新存储库的默认文件系统),那么它非常便携。我经常这样做,并且在系统之间复制存储库没有任何问题,包括 Linux <-> Windows,甚至 Subversion 1.6 和 1.7 之间。 (如果您要跨越 Subversion 版本,只需观看 Subversion 发行说明即可。)
If you're using the Berkeley DB repository storage, then you do need to be very careful - including matching of versions, and even OS. However, if you're using the Fast Secure File System (FSFS, currently the default on any new repositories), it is VERY portable. I do this regularly, and haven't had any issues copying the repository between systems, including Linux <-> Windows, and even between Subversion 1.6 and 1.7. (Just watch the Subversion release notes if you are crossing Subversion versions.)
如果两个系统中的 subversion 版本完全相同,那么应该没问题。我以前曾这样做过,没有遇到任何问题。
即使使用不同的版本,它仍然应该可以工作, 来自 svn 书:
对于您的具体情况(版本 1.6 与 1.7),版本 1.7 的发行说明 澄清了这种情况:
If you have exactly the same version for subversion in both systems, it should be OK. I have done this before without facing any issues.
Even with different versions, it is still supposed to work, from svn book:
For your specific situation (version 1.6 vs 1.7) there is a paragraph in the release notes for version 1.7 that clarifies the situation:
只要新计算机上的 subversion 版本至少是相同的版本,您就可以对 FSFS 存储库执行此操作,不会出现任何问题。复制文件时禁用写访问权限。
另请参阅我对此问题的回答
You can do this for FSFS repositories without any problems, as long as the subversion version on the new computer is at least the same version. disable write access while you copy the files.
See also my answer to this question