SVN server Incremental Backup

Source: Internet
Author: User

SVN server Incremental Backup

The team has an SVN server with dozens of GB space. It has been a full copy of the backup in the interval, but it feels too annoying, some time ago I synchronized the SVN content of this server to another server. It is quite helpful. To sum up, the process is as follows:

Operating System: windows server 2008

SVN: VisualSVN Server

Server: A indicates the original code server, and B indicates the synchronization server.

Install the same visual SVN Server version as Aon on the backup Server

1. Add C: \ Program Files (x86) \ VisualSVN Server \ bin to the environment variable (path) on B. This step is mainly used to avoid path loss for the following SVN commands:

2. Create A database. Because server A already has many databases, the file is processed in batches. The file content is as follows:

Svnadmin create drive letter:/Repositories/Project Library 1

Svnadmin create drive letter:/Repositories/project library 2

......

The names of project libraries 1 and 2 are the same as those in Project.

Then execute the batch processing file, and then there will be many library folders in the Repositories ......

3. Create the hooks file for the target library, the file name is pre-revprop-change.bat, the content is empty, first put in the .. \ sysmodel directory

4. copy the file created in the previous step to each library folder, and process the file in batches as in the previous step. The file content is as follows:

Copy/y local drive: \ Repositories \ sysmodel \ pre-revprop-change.bat drive: \ Repositories \ Project Library 1 \ hooks

Copy/y local drive: \ Repositories \ sysmodel \ pre-revprop-change.bat drive: \ Repositories \ project library 2 \ hooks

......

Then execute the batch processing file

5. Associate the database (initialization) in A and B with batch processing:

Svnsync init file: // local drive letter:/Repositories/SVN path of Project Library 1 Project Library 1 (on server)

Svnsync init file: // local drive letter:/Repositories/SVN path of project library 2 project library 2 (on server)

......

Then execute the batch processing file. This step is to synchronize the content of A for A long time ......

6. In the previous step, B and A have the same content. But what if the project library of A library on A is updated? Now we need to use the task scheduler function in windows.

(1) create a synchronization database. bat batch. The content is as follows:

Svnsync sync file: // local drive letter:/Repositories/Project Library 1

Svnsync sync file: // local drive letter:/Repositories/project library 2

......

(2) create a task scheduler and call the batch files created in the previous step in the scheduler. Each time A task is executed, the update content difference of the corresponding project library in server A can be updated.

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.