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?
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?
Yum install subversion
Yum install httpd
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?
Mkdir/home/svn/
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?
Svnadmin create -- fs-type fsfs/home/svn/repos
Svnadmin create -- fs-type fsfs/home/svn/repos
III. svn data recovery
View plaincopy to clipboardprint?
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?
Mv/root/svn-access-file/home/svn/
Mv/root/passwordfile/home/svn/
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?
Chown-Rvf apache/home/svn/
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