标签:
mkdir -p /home/svn/SH2014/SVNdata
svnadmin create /home/svn/SH2014/SVNdata
2、进入备份机器(172.17.201.88)版本库SVNdata下的hooks目录。
cd /home/svn/SH2014/SVNdata/hooks/
3、创建pre-revprop-change文件
cp pre-revprop-change.tmpl pre-revprop-change
4、修改pre-revprop-change权限,更改为755
chmod 755 pre-revprop-change
5、修改pre-revprop-change内容
为 echo “Changing revision properties other than svn:log is prohibited” >&2 exit 0(1修改为0)
说明如下:
svnsync init file:///home/svn/SH2014/SVNdata http://172.17.201.243/SHSVN/SVNdata --username "svnadmin" --password "adminpassword"
会出现以下信息:
Copied properties for revision 0.
7、在备份机器上执行同步操作
svnsync sync file:///home/svn/SH2014/SVNdata
会出现以下信息:
Transmitting file data . Committed revision 1. Copied properties for revision 1. Transmitting file data . Committed revision 2. Copied properties for revision 2. Transmitting file data . Committed revision 3. Copied properties for revision 3.
出现以上信息就说明同步成功了。
svnlook uuid /home/svn/repos
78312468-8f6a-4e0c-9dc4-2b397672ca84
进入备份机,查看备份机新建库的uuid
svnlook uuid /home/svn/SH2014/SVNdata
会显示新建库的uuid
c7717876-c1c0-4c6c-9b12-70b43bd7116b
将新建库的uuid改成与主机库的uuid相同
svnadmin setuuid /home/svn/SH2014/SVNdata 78312468-8f6a-4e0c-9dc4-2b397672ca84
再次查看新建库的uuid
svnlook uuid /home/svn/SH2014/SVNdata
会显示新库的uuid与主机库的uuid相同了
78312468-8f6a-4e0c-9dc4-2b397672ca84
9、配置Apache和权限
标签:
原文地址:http://www.cnblogs.com/bajie22/p/5435127.html