Linux Programming

Relocating an SVN Server

May 26, 2009

Eventually you reach a point where your Subversion server just isn’t cutting it anymore.  Either the drive is too slow, or it was just some old beat up Pentium MMX you had hiding in the closet.  The time has come to migrate all your repositories to a new home on a better server.  But how do you go about doing this without losing all your history?  Thankfully there is any easy way to do it.

Step 1:
On your old server:
svnadmin dump repositoryPath > repository.dumpfile

Step 2:
Now on your new server run the following commands:
cd /path/to/new-repository-parent-directory
svnadmin create repository-name
svnadmin load repository-name < repository.dumpfile

Step 3:
Last of all, on your client stations run the following command if they are using a command line interface:
svn switch --relocate oldurl newurl
Or if they are using TortoiseSVN just right click, go to TortoiseSVN, then click Relocated. Now punch in the new path to the repository and hit Ok.

Congrats! You’re done

Only registered users can comment.

  1. I suggest Git instead of subversion – It’s much simpler, faster, and more powerful – and you can use it with a subversion server.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.