跨服务器迁移Subversion存储库 [英] Migrating Subversion Repositories across servers

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

问题描述

我们正在移动服务器,而最后一项是在svn存储库上移动.

We're in the process of moving servers and one of the last items is moving over the svn repositories.

大约有10个演出的各种svn存储库.它们是使用以下命令创建的: svnadmin create --fs-type fsfs

There are about 10 gigs of various svn repositories. They were created using this command: svnadmin create --fs-type fsfs

服务器A(原始)的版本为1.4,而服务器B(目标)的版本为1.6.

Server A(original) has svn 1.4 while Server B(target) has svn 1.6.

我的想法是使用rsync迁移整个存储库集(它们全部位于服务器上的1个文件夹中),但我担心某些事情可能无法迁移,或者我需要为为此工作.

My thought was to use rsync to migrate the whole set of repositories (they are all in 1 folder on the server), but I am worried that some things might either not get migrated or I need special switches for rsync for this to work.

大多数在线教程只谈论一次移动1个存储库,例如使用svnadmin hotcopy,但是我总共需要一起移动约100个左右.这是正确的方法吗?

Most online tutorials only talk about moving 1 repository at a time, for example using svnadmin hotcopy, but I need to move about 100 or so all together. Is this the right way to go about it?

推荐答案

Subversion的FSFS在进行复制和移动方面非常稳定,即使在不同的OS上也是如此.尽管mliebelt通过转储重载来做到这一点是正确的,但它需要年龄才能移动10 GB!

Subversion's FSFS is pretty stable on doing copies and movements, even across different OSes. While mliebelt is correct about doing it via dump reload, it takes ages to move 10 GB!

这就是为什么我建议执行以下过程的原因:

That's why I would recommend the following procedure:

  1. 通过文件系统将存储库复制到新服务器.
    例如$ scp -r /var/repos/ user@newServer:repos/

  1. Copy the repositories via filesystem to new server.
    e.g. $ scp -r /var/repos/ user@newServer:repos/

执行$ svnadmin upgrade对存储库进行1.6更新(这是可选操作,但是强烈建议您使用合并跟踪,稀疏签出等1.5/1.6功能)

Do an $ svnadmin upgrade to do an update on repository for 1.6 (this is optional, but highly recommended if you want to use 1.5/1.6 features like merge tracking, sparse checkouts, etc.)

在每个存储库上执行$ svnadmin verify以确认所有修订都可以(您可以在已经运行的服务器上执行此操作).

Do an $ svnadmin verify on each repository to verify all revisions are okay (You can do this on already running server).

通过此过程,您可能需要10到100倍的时间:

By this procedure you need probably 10 to 100 times less time:

例如对于转储存储库,通常大约需要每小时 1 GB (主要取决于HD速度),转储文件比存储库大得多(在SVN 1.4中!) 因此,您必须将较大的文件移动到新服务器上,并在那里进行转储加载,这也需要大约1 hrs/GB.将此与文件系统副本进行比较,如果您具有GBit-LAN​​,则该文件系统副本通常仅受网络连接(100 mbit约10 MB/秒)或HD(约100 MB/秒)的限制.

e.g. for dumping a repository it takes usually approx 1 GB per hour (largely depending on HD-speed), the dump files are much bigger than the repositories(in SVN 1.4!) So you have to move the larger file to the new server and do there an dump-load which also takes approx 1 hrs / GB. Compare this to a filesystem copy which usually is only limited by network connection (100 mbit approx. 10 MB / sec) or HD (approx 100 MB/sec), if you have GBit-LAN.

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

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