将 Subversion 存储库移至另一台服务器

发布于 2024-07-09 12:12:37 字数 617 浏览 6 评论 0原文

我有一台托管我的 Subversion 代码库的服务器。 该服务器当前是 Windows Server 2003 机器,我的 IT 管理员希望将其更新为 Windows Server 2008

这意味着我需要在服务器建立时移动我的 Subversion 存储库,并且想知道将存储库移动到新服务器的最佳实践是什么。

看起来,在网上看,推荐的方法是使用:

svnadmin dump /path/to/repository > repository-name.dmp

然后使用:

svnadmin create repository-name
svnadmin load repository-name< repository-name.dmp

导入存储库。

上述方法看起来是最好的方法吗?

I have a server that hosts my Subversion code base. That server is currently a Windows Server 2003 box, and my IT administrator wants to update it to Windows Server 2008.

This means that I'm going to need to move my Subversion repository while the server gets built up and was wondering what the best practices are for moving the repository to a new server.

It seems like, looking online, the recommended way is to use:

svnadmin dump /path/to/repository > repository-name.dmp

And then use:

svnadmin create repository-name
svnadmin load repository-name< repository-name.dmp

To import the repository.

Does the method above seem like the best approach?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

羞稚 2024-07-16 12:12:37

是的,转储和加载存储库是一种方法。 当且仅当您确定在复制过程正在进行时没有人会访问存储库时,直接复制存储库文件夹是一个可行的选择(或者您可以对存储库进行“热复制”,这可以处理这些情况以安全的方式)。

您还需要重新签出所有工作副本,或使用 svn switch 命令,该命令仅重写 URL。 更方便的方法是使用TortoiseSVN的Relocate命令,这样可以降低重定位过程中出错的风险。

Yes, dumping and loading the repository is a way to go. Copying the repository folder directly is a viable option if, and only if, you are certain nobody will be accessing the repository while the copy process is in progress (or you can do a "hot copy" of the repository, which can handle these cases in a safe manner).

You will also need to either re-checkout all your working copies, or use the svn switch command, which merely rewrites URLs. A more convenient way is to use TortoiseSVN's Relocate command, which reduces the risk of making a mistake during the relocation process.

会傲 2024-07-16 12:12:37

我的恢复脚本如下所示:

svnadmin create repository-name --fs-type fsfs
svnadmin load   repository-name --force-uuid < repository-name.dmp

第一行确保存储库使用 FSFS 后端(许多来源都推荐这样做,包括这个:FSFS 如何更好,据我所知较新版本的 Subversion 使用它作为默认值)。 FSFS 是 Subversion 文件系统实现的名称。

第二行保留存储库的 UUID,以便更轻松地转换(如果没有 --force-uuid 开关,工作副本重定位将失败)。

一些链接:

My restore scripts are like this:

svnadmin create repository-name --fs-type fsfs
svnadmin load   repository-name --force-uuid < repository-name.dmp

The first line ensures the repository uses the FSFS backend (which is recommended by many sources, including this one: How FSFS is Better, and AFAIK newer versions of Subversion use it as default). FSFS is the name of a Subversion filesystem implementation.

The second lines keeps the UUID of the repository, for an easier transition (without --force-uuid switch, the working copy relocation will fail).

Some links:

ㄟ。诗瑗 2024-07-16 12:12:37

您还可以使用 svnsync 移动存储库; 这样您就可以传输所有数据,而无需删除“旧”存储库。 这也是我所知道的从托管环境获取数据的唯一方法,在托管环境中您没有 shell 访问权限或转储存储库的权限。

You can also use svnsync to move the repository; that way you can transfer all the data without the need to take the 'old' repository down. This is also the only way I know of to get your data from hosted environments, where you don't have shell access or access to dumping the repository.

二智少女猫性小仙女 2024-07-16 12:12:37

另一种选择:

使用 svnrdump。
http://www.crowbarsolutions.com/backing-up- Restore-a-remote-svn-repository/

“您将需要一个名为 svnrdump 的工具。正如 Apache 所描述的,“svnrdump 复制了 svnadmin dump 和 svnadmin load 的功能,但适用于远程存储库需要管理员(本地文件系统)访问源或目标存储库。”

Another alternative:

use svnrdump.
http://www.crowbarsolutions.com/backing-up-restoring-a-remote-svn-repository/

"You’re going to need a a tool called svnrdump. As described by Apache, “svnrdump replicates the functionality of svnadmin dump and svnadmin load, but works on remote repositories, instead of needing administrator (local filesystem) access to the source or target repository.”

冷清清 2024-07-16 12:12:37

如果您使用的是文件系统类型存储库,则可以直接获取包含存储库的文件夹并移动它。 如果您要更改服务器,那么您很可能需要使用“重新定位”命令更改本地工作目录查找存储库的位置。

If you are using the File System type repository, you can just literally take the folder containing your repository and move it. If you are changing servers, then chances are you will need to change the location that your local working directory looks for the repository by using the 'Relocate' command.

骑趴 2024-07-16 12:12:37

最简单的方法是使用:

svnadmin hotcopy path/to/your_current_directory /path/to/your_destination_directory

The easiest way is to use:

svnadmin hotcopy path/to/your_current_directory /path/to/your_destination_directory
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文