I recently had to move a subversion (svn) repository to another server. The repository was on a Windows server and had to be moved to a Linux server.
Step 1: Backup your old Repository
The first thing you need when moving from one server to another is a dump of your subversion repository. Hopefully, you are already creating dump’s with a backup script, but if not here’s how you can create a subversion dump file:
The dump file contains all the revisions you have ever made to your svn repository, so it will probably be quite large (it even includes files you may have deleted in a previous revision).
Step 2: Create the new Repository
Now, simply transfer the dump file on to your new subversion server, and create an empty repository:
Step 3: Import your old repository into the new one
Next import your dump file:
svnadmin load /path/to/repository < repo_name.svn_dump
You may want to force subversion to use the same UUID for the new repository as the old repository. To do this add –force-
That’s it, you now have a replica of your old repository on your new server.
What if someone committed a new revision to the old server during installation?
You can easily import the new revision, by creating an incremental dump on the old server:
Now to import that revision on your new server:
svnadmin load /path/to/repository < rev1234.svn_dump
Can’t I just use a
Subversion dumps are designed to work with different versions