The Svnsync can easily synchronize another source SVN version to the specified repository, providing convenience for multi-version library applications.
Example: (The repository is stored under directory/svn/)
Source Version library: svn://196.168.0.1/testa Sync User:sync_source Password:123456
Target repository: svn://196.168.0.2/testb Sync User:sync Password:123456
The source repository is used to develop applications such as edit submissions, and the target repository can only be read for applications such as on-line backup.
go to target server :
Edit Sync Sync Necessary hooks script Pre-revprop-change (go to Repository hooks directory)
CP Pre-revprop-change.tmpl Pre-revprop-change
Modify permissions to allow execution
chmod a+x Pre-revprop-change
Edit (note all available code)
VI Pre-revprop-change
Append the following code (note Code for synchronization can be automatically updated to the site, if no site can be removed)
#svn up/www/testb/--username=sync--password=123456exit 0
Synchronous configuration Initialization
Svnsync init file///svn/testb svn://196.168.0.1/testa--source-username sync_source--source-password 123456-- Sync-username Sync--sync-password 123456--no-auth-cache
Perform synchronization
Svnsync sync svn://196.168.0.1/testa--source-username sync_source--source-password 123456--sync-username Sync-- Sync-password 123456--no-auth-cache
Enter the source server :
Edit the Post-commit script used by the submission (go to the Repository hooks directory)
Vim Post-commit
Append the last side (automatically sync each time you submit)
Svnsync sync svn://196.168.0.2/testb--source-username sync_source--source-password 123456--sync-username Sync-- Sync-password 123456--no-auth-cache
Note that the use of direct commands in the commit hook can affect the commit speed, and use the
(Svnsync sync svn://196.168.0.2/testb--source-username sync_source--source-password 123456--sync-username Sync-- Sync-password 123456--no-auth-cache &)
You can now test the submission of the next file and see if two repositories are synchronized.
This article is from the "gangbusters" blog, make sure to keep this source http://php2012web.blog.51cto.com/5585213/1852311
Linux under Svnsync Sync repository configuration