1. Backup plan
a, target library: svn://192.168.7.223/svn/bak_exam; source library: svn://192.168.7.224/svn/exam_test (note that if a proxy is set, svn:// can be replaced with https:// )
b. Use svnsync for backup
2. Create a target library (operate on the target machine) Make sure that subversion is installed on the machine and the corresponding port is opened (refer to
[url] http://room-bb.iteye. com/blog/2190213[/url]
a. Create: svnadmin create /data/svn/bak_exam
b. Configure the user account password, (suggestion: the account password of the target library is preferably the same as the source library account password)
c. Modify svn library hook file
cd /data/svn/bak_exam/hooks/ cp pre-revprop-change.tmpl pre-revprop-change chmod 755 pre-revprop-change vi pre-revprop-change Comment out the last three lines of the pre-revprop-change document and add a line: exit 0
3. Initialize the target library: svnsync init target library source library (operate on the target machine)
Note: Make sure that the source library svn service has been started here svnserve -d -r /data/svn/
svnsync init file:///data/svn/bak_exam svn://192.168.7.224/exam_test (Can be followed by --username manager --password 123456) When Copied properties for revision 0 appears, the initialization is successful
4. Synchronize the target library svnsync sync target library (operate on the target machine)
svnsync sync file:///data/svn/bak_exam
5. Create a hook, automatic synchronization (operating on the source machine) It seems that after the hook is built, the submission is a bit slow
cd /data/svn/exam_test/hooks/ cp post-commit.tmpl post-commit chmod 755 post-commit vi post-commit Comment out the following line and add: /usr/bin/svnsync sync --non-interactive svn://192.168.7.223/bak_exam --username manager --password 123456