svn服务器之二——双机热备
以下操作均在备机上:1、从机上创建一个用于备份复制的账号2、复制一份主机上版本库下conf下的文件到从机上3、创建钩子hooks/pre-revprop-change.tmpl为/pre-revprop-change4、将最后一行的exit 1修改为exit 05、启动svn服务:svnserve -d -r /home/svn6、初始化svnsync init file:///home/svn
·
以下操作均在备机上:
1、从机上创建一个用于备份复制的账号
2、复制一份主机上版本库下conf下的文件到从机上
3、创建钩子
hooks/pre-revprop-change.tmpl
为
/pre-revprop-change
4、将最后一行的exit 1修改为exit 0
5、启动svn服务:
svnserve -d -r /home/svn
6、初始化
svnsync init file:///home/svn svn://主机IP/svn
如果当前版本库有数据,添加–allow-non-empty
7、同步数据
svnsync sync file:///home/svn
8、自动同步
修改主机上/hooks/post-commit.tmpl 为post-commit,删掉最后三行,添加一行:
svnsync sync --non-interactive svn://备机IP:端口号 --user --password
更多推荐
所有评论(0)