Moving a Subversion Repository to Another Server
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的更多相关文章
- jenkins构建后操作添加“Publish to Subversion repository”与Eclipse更新提交SVN文件冲突
jenkins配置环境信息: 1.安装“SVN Publisher plugin”插件: 2.在系统管理-系统设置中“Global SVN Publisher Settings” 填写信息:
- SVNKit学习——Setting Up A Subversion Repository 创建仓库(三)
所谓Setting Up A Subversion Repository,就是在Subversion所在的服务器上创建一个仓库,说白了就是在磁盘上建一个特殊的目录,这里我以windows举例. 1.使 ...
- 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 ...
- Mac 操作系统安装 SVN server教程(Subversion With Mac OS X Tutorial)
Find recent articles on my github page: rubyrobot.github.io © 2006-2014 Imagine Ecommerce Subversion ...
- jenkins构建,拉取不到最新版本代码,报clock of the subversion server appears to be out of sync
一.问题描述 今天遇到个问题,我这边提交了代码后,一般会马上去jenkins上点一下,构建到开发环境上. 但是发现修改没生效,后来发现,提交的版本假设是3250,但是jenkins构建使用的版本为32 ...
- 处理Linux下subversion尝试连接自建的VisualSVN server报“Key usage violation in certificate has been detected”错误的问题
在Linux下使用subversion尝试链接VisualSVN server搭建的svn库,可能会报下面错误, svn: OPTIONS of 'https://server.domain.loca ...
- Ubuntu14.04 Server Apache2+subversion环境搭建
自从工作后,发现之前的代码开发太随便啦,于是经过不到两年的工作积累,打算在自己开发软件的过程中好好管理自己的项目.于是打算搭建自己的项目服务器,去年搭建过一次,但是由于没有记录,现在需要再来一遍,好多 ...
- Red Gate - SQL Source Control实现对SQL SERVER 的源代码控制
原文地址:http://bbs.csdn.net/topics/350165431 SQL Server 一直没有一款很好的源码控制器,之前自己曾尝试自己写一个,将所有的 脚本 自动生成到某一目录下, ...
- Windows下使用VisualSVN Server搭建SVN服务器
使用 VisualSVN Server来实现主要的 SVN功能则要比使用原始的 SVN和 Apache相配合来实现源代码的 SVN管理简单的多,下面就看看详细的说明. VisualSVN Server ...
随机推荐
- Volatile总结
在java线程并发处理中,有一个关键字volatile的使用目前存在很大的混淆,以为使用这个关键字,在进行多线程并发处理的时候就可以万事大吉. Java语言是支持多线程的,为了解决线程并发的问题,在语 ...
- poj3233
这道题其实算是把快速幂的思想用在多项式之中 A+A^2+A^3+…+A^n=(A+A^1…+A^[n/2])+A^[n/2](A+A+A^1…+A^[n/2])+n mod 2*A^n 然后就是打码的 ...
- BZOJ1606: [Usaco2008 Dec]Hay For Sale 购买干草
1606: [Usaco2008 Dec]Hay For Sale 购买干草 Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 612 Solved: 46 ...
- 【转】Unity3D NGUI事件 UIEvents
原创文章如需转载请注明:转载自 脱莫柔Unity3D学习之旅 QQ群:[119706192] 本文链接地址: Unity3D NGUI事件 UIEvents UIEvents-事件系统void OnH ...
- mac下的改装人生——关于机械键盘
这几天好像弄了很多关于机械键盘的东西,我自己的这块键盘也已经慢慢熟悉了,感觉打字超级爽哈,然后看了很多网上关于机械键盘的帖子,也看了很多教程,在Amazon和Taobao看了很多键盘的价位,前几天还试 ...
- JSP路径的问题
JSP因为是客户端使用的路径,所以完全可以使用全路径形式 那么在JSP里面使用路径的方式有两种,超链接或者form 当我们在MyEclipse中新建JSP时,可以发现有下面 <%@ page l ...
- 与IO相关的等待事件troubleshooting-系列5
'db file scattered read' 这是另一种常见的等待事件.他产生于Oracle从磁盘读取多个块到Buffer Cache中非连续(" scattered&q ...
- Qt对话框QDialog
QDialog是Qt中所有对话框窗口的基类 当QWidget无父组件的时候作为一个独立的窗口,有父组件的时候,将作为一个可见的部件嵌入到父组件里面. QDialog不能作为子部件嵌入到其他容器中 对话 ...
- bzoj2132: 圈地计划
要分成两坨对吧.. 所以显然最小割 但是不兹辞啊.. 最小割是最小的啊 求最大费用怎么玩啊 那咱们就把所有费用都加起来,减掉一个最小的呗 但是两个属于不同集合的点贡献的价值是负的啊 网络流怎么跑负的啊 ...
- 洛谷 P1005 矩阵取数游戏
题目描述 帅帅经常跟同学玩一个矩阵取数游戏:对于一个给定的n*m的矩阵,矩阵中的每个元素aij均为非负整数.游戏规则如下: 1.每次取数时须从每行各取走一个元素,共n个.m次后取完矩阵所有元素: 2. ...