Written by
arstercz
-
svn镜像同步
#全量同步操作: 目标主机新建仓库repos:
svnadmin create /export/svn_mirror/svn/repo
#源主机操作
#svnsync init https://svn.dest.com/svn/repo file:///data/svn/repo
#svnsync sync https://svn.dest.com/svn/repo #从版本0开始同步,时间较长
#增量同步
目标主机操作: 恢复一份repo的副本到目标主机(hotcopy方式或主svn未访问时的一份copy)
#源主机操作:
#设置last-merge位置,此为slave最后版本号的值
# svn propset --revprop -r0 svn:sync-last-merged-rev 40337 https://svn.dest.com/svn/repo/
property 'svn:sync-last-merged-rev' set on repository revision 0
svnsync sync https://svn.dest.com/svn/repo #从40337+1号开始同步
注:
碰到svn: SSL is not supported,临时开启目标主机的80端口,通过http设置
碰到以下错误:通过svn propset –revprop -r0 svn:sync-last-merged-rev 40337 https://svn.dest.com/svn/repo/来设置last merge的版本号.
[root@repo svn]# svnsync sync --non-interactive --no-auth-cache https://svn.dest.com/svn/repo/ --sync-username=mgr1sync --sync-password=mgr1mirrorsync
svnsync: Destination HEAD (40337) is not the last merged revision (30211); have you committed to the destination without using svnsync?