Profile:
1. Two Linux servers, one currently in use, such as server 1: 172.17.210.82 (Backup is also in this machine),
The other one needs to be restored, such as server 2: 172.17.210.218 (Restore on the 172.17.210.218 server using a backup of the 172.17.210.82 server)
2. server 2:172.17.210.218 need to install SVN first, preferably with server 1:172.17.210.82 directory consistent, such as:/DATA/SVN
Specific Linux installation SVN can refer to the following link, the installation directory is:/OPT/SVN, you can install in/DATA/SVN,
Http://www.cnblogs.com/iconfig/p/4702518.html
3. First look at server 1:172.17.210.82 's svn backup script and path, such as: SVN library: Scm-admin
Svnadmin Dump/data/svn/scm-admin >/data/backup/svn-dump/scm-admin.dump
4. Since we have a lot of SVN libraries here, the user account and Rights Management files are unified in:/data/svn/conf, the hook script is also unified in:/data/svn/hocks.
1-Create a directory on server 2:172.17.210.218
mkdir -p/data/svn/confmkdir -p/data/svn/hooks
2-Copy configuration file and Hook script
SCP [Email protected] 172.17. 210.82:/data/svn/conf/authz/data/svn/confSCP [email protected]172.17. 210.82:/data/svn/conf/passwd /data/svn/confSCP [email protected]172.17 . 210.82:/data/svn/conf/svnserve.conf/data/svn/confSCP [email protected] 172.17. 210.82:/data/svn/hooks/pre-commit/data/svn/hooks
3-Create Scm-admin Repository
Svnadmin Create/data/svn/scm-admin
4-copy Backup to server 2:172.17.210.218
SCP [Email protected] 172.17. 210.82:/data/backup/svn-dump/scm-admin.dump/data/svn/scm-admin
You need to enter the root password of the server 1:172.17.210.82
5-Restore SVN library
Svnadmin Load/data/svn/scm-admin </data/svn/scm-admin/scm-admin.dump
Enter a record restore state, please wait patiently, the SVN library will take a long time
5. Go to the configuration directory conf, delete the original, and point to the Unified configuration directory
cd/data/svn/scm-admin/confRM *-RFLN -S. /.. /conf/authz authzLn -S. /.. /conf/passwdpasswdLn -S. /.. /conf/svnserve.conf svnserve.conf
6. Go to the Hooks script directory and point to the Unified Hook script directory
cd/data/svn/scm-admin/hooksLn -S. /.. /hooks/pre-commit pre-commitchmod +x pre-commit
7. Start SVN
Svnserve-d-R/DATA/SVN
at this point: The SVN backup repository has been restored successfully and can be accessed normally.
8. If the original port is not the default: 3690, you can also modify the SVN process, and then modify the SVN port, such as: 9999
Killall9999
Linux SVN restore Backup Library