SVN service with svnsync command dual-machine hot standby
SOURCE directory: Svn://srcip/taobaotop
Target directory: Svn://desip/taobaotop
Steps:
Www.ahlinux.com
If the target directory has the same item, clear it and re-establish the empty project, for example:
Mkdir-p/data/svndata/taobaotop
Svnadmin Create/data/svndata/taobaotop
2. Start the SVN from the machine
Svnserve-d-r/data/svndata/
3. Perform on-board:
Cd/data/svndata/taobaotop/hooks
CP Pre-revprop-change.tmpl Pre-revprop-change
VI Pre-revprop-change
Change the last line of Pre-revprop-change to exit 0, then chmod 755 pre-revprop-change
4. The/data/svndata/taobaotop/conf directory on the host to a package, sent to the same path from the machine, covering decompression.
5. Performing on-board
Svnsync Init file:///data/svndata/taobaotop svn://srcip/taobaotop
Midway will ask you the root password of the host and SVN username password, fill in. And then show:
Copied Properties for revision 0. (Copy the attributes of version 0. )
6. After initialization is complete, execute
Svnsync Sync File:///data/svndata/taobaotop for synchronization
7. In order to be able to update the host, the slave automatic synchronization, need to do some operations on the host.
Create/Modify the Post-commit script under host/hooks/, adding a line to the following:
Svnsync sync--non-interactive svn://desip/taobaotop--username name--password pwd
- This article is from: Linux Tutorial Network
SVN service with svnsync command dual-machine hot standby