Linux under Svnsync Sync repository configuration

Source: Internet
Author: User
Tags auth svn

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.