Svn migration, backup, data recovery after system reinstallation

Source: Internet
Author: User
Svn service to migrate to another linux host the original server svn Configuration repository path:/home/svn/repos permission file:/home/svn-access-file user authentication file: /home/svn/passwordfileapache configuration file:/etc/httpd/conf. d/subversion. confsvn service startup script/etc/init. d. svn: 1. back up svn on the original server and back up

Svn service to be migrated to other linux hosts

Svn configuration of the original server

Repository path:/home/svn/repos

Permission file:/home/svn-access-file

User Authentication File:/home/svn/passwordfile

Apache configuration file:/etc/httpd/conf. d/subversion. conf

Svn service startup script/etc/init. d/svn

The procedure is as follows:

1. back up svn on the original server. the backup content is as follows:

1. back up the/home/svn-access-file

2. back up the/home/svn/passwordfile file

3. back up the/etc/httpd/conf. d/subversion. conf file

4. back up the/etc/init. d/svn file

5. export the version library as a file and use the following command

View plaincopy to clipboardprint?
  1. Svnadmin dump/home/svn/repos> svn_bak

Svnadmin dump/home/svn/repos> svn_bak

Upload the backup files to a directory of the new linux host, such as/root/

2. install svn and apache in the new linux environment and configure

1. run the following command to install svn:

View plaincopy to clipboardprint?
  1. Yum install subversion

  2. Yum install httpd

  3. Yum install mod_dav_svn

Yum install subversion yum install httpd yum install mod_dav_svn

2. create a repository folder

View plaincopy to clipboardprint?
  1. Mkdir/home/svn/

  2. Mkdir/home/svn/repos

Mkdir/home/svn/repos

3. run the command to create a version library and specify the data storage as FSFS. if you want to specify the database as Berkeley DB, replace fsfs with bdb.

View plaincopy to clipboardprint?
  1. Svnadmin create -- fs-type fsfs/home/svn/repos

Svnadmin create -- fs-type fsfs/home/svn/repos

III. svn data recovery

View plaincopy to clipboardprint?
  1. Svnadmin load/home/svn/repos/</root/svn_bak

Svnadmin load/home/svn/repos/</root/svn_bak

2. restore permissions and authenticate the configuration file


View plaincopy to clipboardprint?
  1. Mv/root/svn-access-file/home/svn/

  2. Mv/root/passwordfile/home/svn/

  3. Mv/root/subversion. conf/etc/httpd/conf. d/

Mv/root/svn-access-file/home/svn/mv/root/passwordfile/home/svn/mv/root/subversion. conf/etc/httpd/conf. d/

3. Grant the version library permission


View plaincopy to clipboardprint?
  1. Chown-Rvf apache/home/svn/

  2. Chomd 755/home/svn/

Chown-Rvf apache/home/svn/chomd 755/home/svn/

Note: This step is very important. if not, it may appear
Can't create directory '/home/svn/repos/db/transactions/1-2.txn': Permission denied. because svnadmin create is a root identity, mod_dav_svn has no write permission.

4. start svn

Restore the svn file to the/etc/init. d/directory, give it executable permissions, and then

Service svn start


Related Article

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.