Jun 15, 2008

HOWTO: Migrate your svn repository between servers

Author: gaweee | Filed under: development, howto
Step 1 – Backup your svn data:

svnadmin dump /path/to/somerepository < somerespositry.svn.backup

The resulting file can be pretty large. Its basically a file of all your snapshots. Needless to say, if you’re at revision 300, be prepared to wait.

Step 2 – Create the new respository:
login to the new server to create the repository

svnadmin create /path/to/newrespository

Double check the created directory structure where possible, many a times my svn folders arent created with the correct group write permissions. So remote commits encounters transaction errors

Step 3 – Restore the repository on the new server

svnadmin load /path/to/newrepository < somerepository.svn.backup

And you’re done! really simple wasnt it?


2 Responses to “HOWTO: Migrate your svn repository between servers”

  1. Brian Says:

    Please be aware that it is rather risky running a dump while the users could be updating.

    You *may* need your configuration files,like authz and svnperms.conf, or you may have a database and no users to be able to open the directories or the files.

    It *might* be useful to also collect a copy of /etc/password/, /etc/shadow, plus your httpd.conf file – if only for reference.

    Your mileage WILL vary….

  2. sonia Says:

    Thanks dude, nice to check what others have done before I migrate my repo.

Leave a Reply