Moving Repositories from one SVN server to another

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.

  1. Log on to the old server and open up a command prompt.
  2. In the command prompt navigate to the bin folder where the svnadmin exe is found.
  3. Run this command svnadmin dump path/to/repository > repositoryname.dmp. For example: svnadmin dump C:/Repositories/TestProject > C:/TestProject.dmp
  4. Make sure that you are pointing to where the repositories actually are. I initially tried using the URLs and that doesn’t work.
  5. Log on to the new server and copy the DMP file across
  6. Open a command prompt and navigate to the bin folder where the svnadmin exe is found
  7. Run this command svnadmin load path/to/repository < repositoryname.dmp. For example: svadmin load E:/Repositories/NewProject < C:/TestProject.dmp
  8. 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.

Advertisements

One thought on “Moving Repositories from one SVN server to another

  1. An impressive share! I’ve just forwarded this onto a coworker who had been doing a little research on this. And he in fact ordered me breakfast because I stumbled upon it for him… lol. So allow me to reword this…. Thanks for the meal!! But yeah, thanx for spending time to discuss this subject here on your internet site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s