Migrate Subversion repository
Posted: March 21st, 2011 | Author: Jon | Filed under: System Administration | Tags: backup, subversion, svn | No Comments »I needed to migrate an existing Subversion repository to a new server today, here’s how I did it:
1. Dump your existing Subversion repository to a compressed file.
svnadmin dump /path/to/repo | gzip > /tmp/repo.svn.gz
2. Transfer the compressed file to the new server.
scp /tmp/repo.svn.gz user@server:/path/to/
3. Create a new Subversion repository on the new server.
svnadmin create /path/to/repo
4. Decompress the repository dump file and import it into the new Subversion repository.
gzip -cd /path/to/repo.svn.gz | svnadmin load --force-uuid /path/to/repo
Notes:
- The dump command will also allow you to switch between BDB or FSFS back end types (link).
- The –force-uuid option should allow you to switch any checked out projects to the new Subversion repository location.
Leave a Reply