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 another, the old repository looks like below:

#repositories

--repository

----branch

----tags

----trunk

--------projects

----------calc/

----------cal/

----------spreadsheet/

Now I want to move each project into separate repository, looks like below:

#repositories

--CalcRepository

----branch

----tags

----trunk

--CalRepository

----branch

----tags

----trunk

--SpreadsheetRepository

----branch

----tags

----trunk

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 D:\Repositories\repository > D:\svn_backup\all_repo.dump

Use the --revision (-r) option to specify a single revision, or a range of revisions, to dump. If you omit this option, all the existing repository revisions will be dumped.

$ svnadmin dump myrepos -r 23 > rev-23.dumpfile
$ svnadmin dump myrepos -r 100:200 > revs-100-200.dumpfile

STEP 2: FILTER FOLDER FROM DUMP FILE

$ svndumpfilter include
trunk/projects/calc < D:\svn_backup\all_repo.dump >
D:\svn_backup\calc.dump

$ svndumpfilter include
trunk/projects/cal < D:\svn_backup\all_repo.dump > D:\svn_backup\cal.dump

$ svndumpfilter include
trunk/projects/spreadsheet < D:\svn_backup\all_repo.dump >
D:\svn_backup\spreadsheet.dump

At
this point, you have to make a decision. Each of your dump files will create a
valid repository, but will preserve the paths exactly as they
were in the original repository. This Repository Administration means that even
though you would have a repository solely for your calc project, that
repository would still have a top-level directory named calc. If you want your trunk, tags, and branches directories to live in the root of your repository, you
might wish to edit your dump files, tweaking the Node-path and Node-copyfrom-path headers so that they no longer
have that first calc/ path component. Also, you'll want to remove the section
of dump data that creates the
calc directory. It will look something like the following:

Node-path:  /trunk/projects/calc    => /trunk

Node-copyfrom-path:
/trunk/projects/calc   
=> /trunk

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 3: Create the new Repository

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

$ svnadmin create D:\Repositories\CalcRepository

$ svnadmin create D:\Repositories\CalRepository

$ svnadmin create
D:\Repositories\SpreadSheetRepository

Step 4: Import your old repository
into the new one

Next import your dump file:

$ svnadmin load CalcRepository < D:\svn_backup\calc.dump

$ svnadmin load CalRepository < D:\svn_backup\calc.dump

$ svnadmin load SpreadsheetRepository < D:\svn_backup\Spreadsheet.dump

Moving a Subversion Repository to Another Server的更多相关文章

  1. jenkins构建后操作添加“Publish to Subversion repository”与Eclipse更新提交SVN文件冲突

    jenkins配置环境信息: 1.安装“SVN Publisher plugin”插件: 2.在系统管理-系统设置中“Global SVN Publisher Settings” 填写信息:

  2. SVNKit学习——Setting Up A Subversion Repository 创建仓库(三)

    所谓Setting Up A Subversion Repository,就是在Subversion所在的服务器上创建一个仓库,说白了就是在磁盘上建一个特殊的目录,这里我以windows举例. 1.使 ...

  3. How do I list subversion repository's ignore settings

    If it is Windows and you are using TortoiseSVN, then right-click on a folder of the working copy, go ...

  4. Mac 操作系统安装 SVN server教程(Subversion With Mac OS X Tutorial)

    Find recent articles on my github page: rubyrobot.github.io © 2006-2014 Imagine Ecommerce Subversion ...

  5. jenkins构建,拉取不到最新版本代码,报clock of the subversion server appears to be out of sync

    一.问题描述 今天遇到个问题,我这边提交了代码后,一般会马上去jenkins上点一下,构建到开发环境上. 但是发现修改没生效,后来发现,提交的版本假设是3250,但是jenkins构建使用的版本为32 ...

  6. 处理Linux下subversion尝试连接自建的VisualSVN server报“Key usage violation in certificate has been detected”错误的问题

    在Linux下使用subversion尝试链接VisualSVN server搭建的svn库,可能会报下面错误, svn: OPTIONS of 'https://server.domain.loca ...

  7. Ubuntu14.04 Server Apache2+subversion环境搭建

    自从工作后,发现之前的代码开发太随便啦,于是经过不到两年的工作积累,打算在自己开发软件的过程中好好管理自己的项目.于是打算搭建自己的项目服务器,去年搭建过一次,但是由于没有记录,现在需要再来一遍,好多 ...

  8. Red Gate - SQL Source Control实现对SQL SERVER 的源代码控制

    原文地址:http://bbs.csdn.net/topics/350165431 SQL Server 一直没有一款很好的源码控制器,之前自己曾尝试自己写一个,将所有的 脚本 自动生成到某一目录下, ...

  9. Windows下使用VisualSVN Server搭建SVN服务器

    使用 VisualSVN Server来实现主要的 SVN功能则要比使用原始的 SVN和 Apache相配合来实现源代码的 SVN管理简单的多,下面就看看详细的说明. VisualSVN Server ...

随机推荐

  1. 【转】Android Listener侦听的N种写法

    原文网址:http://blog.csdn.net/ithomer/article/details/7489274 Android中,View的Listener方法,在是否使用匿名类匿名对象时,有各种 ...

  2. 有关DOM的小总结

    一直以为DOM(文档对象模型)是JS中最简单的一部分.不可否认,它确实很简单,因为DOM的思维模式有点固定,只需要简单地记住一些固定的方法,所以DOM可以说是所有js(这里指的是客户端的js)入门的起 ...

  3. unity3d Human skin real time rendering plus 真实模拟人皮实时渲染 plus篇

    最近逃课做游戏,逃的有几门都要停考了,呵呵呵,百忙之中不忘超炒冷饭,感觉之前的人皮效果还是不够好,又改进了一些东西 首先上图 放大看细节 显而易见的比上次的效果要好很多,此次我把模型用3dmax进行了 ...

  4. Java---基于TCP协议的相互即时通讯小程序

    这是几年前,新浪的一个面试题~要求是3天之内实现~ 通过TCP 协议,建立一个服务器端. 通过配置服务器端的IP和端口: 客户端之间就可以相互通讯~ 上线了全部在线用户会收到你上线的通知. 下线了全部 ...

  5. [ReadingNotes] Search the links, static final in the java

    [ReadingNotes] Search the links, static final in the java */--> pre { background-color: #2f4f4f;l ...

  6. DocumentBuilder setEntityResolver() Method

    Description The Javax.xml.parsers.DocumentBuilder.setEntityResolver(EntityResolver er) method specif ...

  7. Working XML: Processing instructions and parameters

    Adding support for multiple style sheets This month our hardworking columnist(专栏作家) adds support for ...

  8. hdu4431 Mahjong 枚举搜索。。

    japanese麻将什么玩意..都没有豪华七对... 没什么难的 就是枚举搜索了 分三种类型的胡牌 f1是七对 f2是十三幺 f3是普通的胡牌 就先找一对 再找三个三个的 就是一直超时..在峰峰的指导 ...

  9. weblogic 日志介绍

    1.server.log 该日志记录的是服务(包括admin server 和 app server)启动过程中和关闭过程中的日志,还包括部署在服务上面的应用,在运行过程中所产生的日志. server ...

  10. 【机房系统知识小结】微软自带RDLC报表,数据汇总设计

    在做机房系统报表的时候,借鉴 八期崔成龙学长的博客< VB.NET rdlc 报表的使用>,照虎画猫的敲了一遍,但是在“汇总项”中,出现了一点小问题. 具体的设计方法在这里就不做介绍了,请 ...