SVN Repository Transfer

SVN Repository Transfer

I recently had to move my main Subversion repository to a new server, so I thought I would pass along this quick how-to. To move a Subversion repository from one system to another you only have to enter a couple of easy subversion commands. To start, go to the source system and at a command prompt or terminal window type:
svnadmin dump /path/to/repository > repository-name.dmp
If the dump file is rather large you can compress it with your favorite zip utility. Now you need to get the dump to your new server, so simply transfer the file via sFTP. Once the dump file is on the new machine and uncompressed, you need to set up and load the new repository by typing: If the repository is not created yet, type in
svnadmin create new-repository-path
then load the dump file
svnadmin load new-repository-path < repository-name.dmp
Of course, you will need to be in the direcotry where repository-name.dmp file resides. A couple of small things to note – the dump file will be rather large as it represents every commit made on your repository. If your repository is rather large and mature, this file could get quite large. So I think this approach works well for non-large svn repository, and it becomes impractical for very large repositories, e.g. the repositories that are more than a few hundred MB big. Also this method works across platforms so moving from UNIX to Windows or visa-versa is also possible.


Leave a Reply

Your email address will not be published. Required fields are marked *

My new Snowflake Blog is now live. I will not be updating this blog anymore but will continue with new contents in the Snowflake world!