I recently set up a new SVN server at work and today we moved one of our projects from the old SVN server to this new one. We use VisualSVN on both.
To do this you need to first create a dump file on the old server then copy the dump file to the new server and load that up. This is done via the svnadmin executable.
These are the steps I followed.
- Log on to the old server and open up a command prompt.
- In the command prompt navigate to the bin folder where the svnadmin exe is found.
- Run this command svnadmin dump path/to/repository > repositoryname.dmp. For example: svnadmin dump C:/Repositories/TestProject > C:/TestProject.dmp
- Make sure that you are pointing to where the repositories actually are. I initially tried using the URLs and that doesn’t work.
- Log on to the new server and copy the DMP file across
- Open a command prompt and navigate to the bin folder where the svnadmin exe is found
- Run this command svnadmin load path/to/repository < repositoryname.dmp. For example: svadmin load E:/Repositories/NewProject < C:/TestProject.dmp
- I had some problems trying to get this to write into a new empty repository. The problem was I’d created a new repository that contained the default structure: branches, tags and trunk. When I created a new repository without this default structure then it worked OK.
I’m writing this up and hoping that if I ever have to do it again then these notes might help. If they help someone else as well that would be great too.