How to migrate svn repository

Subversion (SVN) is a version control system, maintaining versions for files and directories. SVN uses FSFS (Fast Secure File System) as the backend storage to store revision histories.

If you would like to migrate the current subversion repository on one server onto another server, without losing all revision history, you can use svnadmin's dump command which dumps the contents of FSFS to stdout. Then you can use svnadmin's load command to load the saved dump file into a new SVN repository. Follow these steps to migrate SVN repository to a new server.

On old svn server, create a svn dump of existing svn repository.

$ sudo svnadmin dump /path/to-your/repo > svn.dump

The above command will dump all existing svn history to a dump file. If you instead would like to migrate specific svn revisions (e.g., from revision 1000 to 2000), you can generate svn dump as follows.

$ sudo svnadmin dump /path/to-your/repo -r 1000:2000 > svn.dump

Now transfer the created svn.dump to a new server.

On new svn server, restore svn dump on to the server.

$ sudo apt-get install subversion
$ sudo svnadmin create /svnrepos
$ sudo svnadmin load /svnrepos < svn.dump

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

Leave a comment

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