Sunday, December 4, 2011

Backup and Restore the Subversion Repository


It is a good practice backup Subversion repository to avoid any loss of data and sometimes you may need to move the svn repository from one server to another server.You can move your repository to another server with the following method.

1. Backup your repository( Create dump)
# svnadmin dump /path to /repository   >  repositoryname.dump

2. Copy the dump file to the new server
# scp -r repositoryname.dump   username@ipaddress:/destination path
Here destination path is location on the target server where the dump file has to be copied.

3. Create a new Repository on the target server
# svnadmin create <repositoryname>
Ex: #svnadmin create /var/www/testrepo

4.Import the dump file to the new repository.
# svnadmin load  /path to repository  <  repositoryname.dump
Post a Comment