如何将 SVN 存储库移动到新服务器 [英] How to move an SVN repository to a new server

查看:61
本文介绍了如何将 SVN 存储库移动到新服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想将我们的两台服务器合并在一起,为了做到这一点,我们需要在新"服务器上安装 SVN,然后移动我们在旧"服务器上设置的所有存储库.

We would like to merge two of our servers together and in order to do that we would need to install SVN on the "new" server and then move over all of our repositories that we have set up on our "old" server.

这是一个简单的操作吗?可能使用 TortoiseSVN 提供的重定位"选项?最好的方法是什么?

Is this an easy operation to do? Possibly using the "Relocate" option that TortoiseSVN provides? What is the best way to do it?

这是否也是重新组织存储库设置方式的好时机?

Would this be a good time to re-organize how the repository is set up as well?

推荐答案

您可以使用 svnadmin dump 功能迁移存储库.在 SVN 服务器上,输入 svnadmin dump/absolute/path/to/the/repo >/tmp/repo.svndump.这会将整个存储库导出到系统临时目录中的文本文件中,并将其命名为repo.svndump".您可能希望在将该文件传输到新服务器之前对其进行压缩.

You can migrate a repository using the svnadmin dump function. On the SVN server, type svnadmin dump /absolute/path/to/the/repo > /tmp/repo.svndump. This will export the entire repository to a text file in the system's temporary directory and name it "repo.svndump". You might want to compress that file before transferring it to the new server.

导出存储库后,您可以将转储文件传输到新服务器并像这样导入它:svnadmin load/absolute/path/to/the/**new**/repo repo.svndump.

Once you have the repo exported, you can then transfer the dump file to the new server and import it like so: svnadmin load /absolute/path/to/the/**new**/repo < repo.svndump.

请参阅svnadmin 转储"和svnadmin load' 了解更多信息.

See 'svnadmin dump' and 'svnadmin load' for more information.

在转储存储库并将其加载到新服务器上后,您将使用 --relocate 命令将本地副本切换到新服务器.

After dumping the repository and loading it on the new server you would use the --relocate command to switch your local copy to the new server.

警告:如果您的存储库使用任何externals,那么您将遇到一些问题.有关此问题的详细信息,请参阅我的问题关于服务器故障.

Caution: If your repositories use any externals then you will have some problems. See my question on Server Fault for details about this.

这篇关于如何将 SVN 存储库移动到新服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆