I recently had to move our main Subversion repository to a new server the other day, 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 FTP, local share, CD, thumbdrive or whatever it takes.
Once the dump file is on the new machine and uncompressed, you need to set up and load the new repo by typing:
cd /path/to/new-repository svnadmin create repository-name svnadmin load repository-name< repository-name.dmp
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. Also this method works across platforms so moving from UNIX to Windows or visa-versa is also possible.