Backup and recovery of SVN in Linux

Source: Internet
Author: User
Tags svn secure copy

There are three ways to backup SVN in Linux

1, Svnadmin Dump is the official recommended backup method, the advantage is more flexible, can be full-scale backup can also be incremental backup, and provide version recovery mechanism.

The disadvantage is that the version number is too large to increase to more than tens of thousands of, then the dump and load process will be very slow, long time is not conducive to rapid disaster recovery. This backup can be used in cases where the number of versions is small.

2, Svnadmin Hotcopy can only make a full-volume copy, can not be incremental backup. The advantage is faster backups and faster restores. The disadvantage is that hard drives are relatively expensive.

3, Svnsync is actually making 2 mirror libraries, when a bad time can quickly switch to another. More than 1.4 version support is required, not discussed here.

Svnadmin Dump Method:

1, the full amount of backup a warehouse:

#svnadmin Dump/svn/svn/app >/svn/svndump/app_dump160802

Configure the same SVN server to import the dump backup file on another machine

#svnadmin Load/svn/svn/app < app_dump160802

Copy the original server's configuration file back to the new server Authz, passwd, svnserver.conf

2. Incremental backup

#svnadmin dump/svn/svn/app-r 5200:5600--incremental >/svn/svndump/app_5600

5200 is the latest version at the time of the last full-volume backup, and 5600 is the current latest version.

Import: Svnadmin Load/svn/svn/app < app_5600

Svnadmin Hotcopy Method:
1. Backup

Svnadmin hotcopy/svn/svn/app//data/svn. ' Date +%f:%t '. Bak–clean-logs

If the –clean-logs option is passed, Svnadmin performs a hot copy operation and then removes the unused Berkeley DB log file.
You can run this command at any time to get a secure copy of the repository, regardless of whether other processes use the repository.
2. Restore

Svnadmin hotcopy/home/svn. ' Date +%f:%t '. Bak/home/svn. ' Date +%f:%t '. bak

Backup and recovery of SVN in Linux

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.