Svnsync Implementing a synchronous backup of a repository

Source: Internet
Author: User
Tags svn client

Svnsync to achieve a synchronous backup of the repository experimental environment: a,172.17.201.243 (Master) b,172.17.201.88 (preparation) project requirements, production environment requires SVN server to implement the hot standby mechanism, so I think of the SVN svnsync mechanism, The operation flow is as follows: 1. Build the repository on the machine you want to back up (172.17.201.88)
Mkdir-p/home/svn/sh2014//home/svn/sh2014/svndata

2. Enter the hooks directory under the backup machine (172.17.201.88) repository Svndata.

cd/home/svn/sh2014/svndata/hooks/

3. Create a Pre-revprop-change file

CP Pre-revprop-change.tmpl Pre-revprop-change

4. Modify Pre-revprop-change permissions and change to 755

755 Pre-revprop-change

5. Modify Pre-revprop-change Content

 is prohibited ">&20(1 modified to 0)

The description is as follows:

The original script means that if you modify the Svn:log property, it will allow the modification to return 0; otherwise, it is not allowed, return 1 we want to change it to allow all properties to be modified, directly return 0 6 in the script, perform synchronous initialization on the backup machine
Svnsync init file://http://172.17.201.243/SHSVN/SVNdata  --username "Svnadmin"-- Password "AdminPassword"

The following message appears:

 for 0.

7. Perform synchronous operations on the backup machine

Svnsync sync File://home/svn/sh2014/svndata

The following message appears:

1for 1 2 for 2 3  for3.

The above information indicates that synchronization is successful.

8. Setting the uuid,uuid of the backup library is a random number generated automatically when Respository is created, and SVN client uses the UUID to determine whether it is the same library. Enter the host to see the UUID of the host library
Svnlook uuid/home/svn/Repos
The UUID of the host library is displayed
78312468-8f6a-4e0c-9dc4-2b397672ca84

Enter the backup machine to view the UUID of the new library of the backup machine

Svnlook Uuid/home/svn/sh2014/svndata

The UUID of the new library is displayed

c7717876-c1c0-4c6c-9b12-70b43bd7116b

Change the UUID of the new library to be the same as the UUID of the host library

78312468-8f6a-4e0c-9dc4-2b397672ca84

View the UUID of the new library again

Svnlook Uuid/home/svn/sh2014/svndata

The new library's UUID is displayed with the same UUID as the host library.

78312468-8f6a-4e0c-9dc4-2b397672ca84

9. Configure Apache and Permissions

When the host outage requires the backup machine immediately on the top, modify the IP. If the client already has a checkout project, the relocate,relocate precondition is that the UUID is the same.

Svnsync Implementing a synchronous backup of a repository

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.