如何迁移svn库 简单的dump/load方式

公司需要转移svn库,但是现有的svn库在内网.切路由器密码未知无法快速的同步到辛苦只能使用dump load 备份/恢复svn库

Moving a Subversion Repository to Another Server

misc

Moving a subversion repository from one server to another, while still preserving all your version history may seam like a daunting task, but fortunately it's not too difficult.

I recently had to move a subversion (svn) repository to another server. The repository was on a Windows server and had to be moved to a Linux server.

Step 1: Backup your old Repository

The first thing you need when moving from one server to another is a dump of your subversion repository. Hopefully you are already creating dump's with a backup script, but if not here's how you can create a subversion dump file:

svnadmin dump /path/to/repository > repo_name.svn_dump

The dump file contains all the revisions you have ever made to your svn repository, so it will probably be quite large (it even includes files you may have deleted in a previous revision).

Step 2: Create the new Repository

Now, simply transfer the dump file on to your new subversion server, and create an empty repository:

svnadmin create /path/to/repository

Step 3: Import your old repository into the new one

Next import your dump file:

svnadmin load /path/to/repository < repo_name.svn_dump

You may want to force subversion to use the same UUID for the new repository as the old repository. To do this add --force-uuid to yoursvnadmin load command. In my case I wanted to do this. If you have already loaded your repository, there is a way to set the UUID at a later date, check the docs.

That's it, you now have a replica of your old repository on your new server.

FAQ's

What if someone committed a new revision to the old server during installation?

You can easily import the new revision, by creating an incremental dump on the old server:

svnadmin dump --incremental -r 1234 /path/to/repository > rev1234.svn_dump

Now to import that revision on your new server:

svnadmin load /path/to/repository < rev1234.svn_dump

Can't I just use a hotcopy to restore the repository?

It depends, hotcopies created with svnadmin hotcopy must be moved to a server with identical setup. You should have the same version of subversion installed on both servers, same operating system, etc.

Subversion dumps are designed to work with different versions of subversion, and are just more flexible. Hotcopies are handy to have, but I recommend creating both hotcopies and dumps as part of your backup plan.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值