SWAT Blog

Move a Subversion Repository from One Remote Server to Another

December 28th, 2010 by Bhagwan Dass

The servers were in remote locations and all I had was ssh access.

Step One: Back up your old repository
This is done with the svnadmin command.

svnadmin dump /srv/svn/repository_name > reponame.dmp

Step Two: Create the new Repository on new svn server
This is same as creating a new project on your svn server

svnadmin create /srv/svn/repository_name

Step Three: Transfer the old Repository dump on your new svn server
You can do this by any way you want. I choose scp.

scp reponame.dmp root@remote-server:/opt/new_repo_name

Last Step: Import your old repository into the new one

root@server:~#cd /opt
root@server:/opt#svnadmin load /srv/svn/new_repository_name < reponame.dmp

It’s very simple. My .dmp file was about 2GB so it took hours to transfer. But if you have physical access to the servers this could be a few minutes job.

Tags: , , ,

Leave a Reply

  • © 2004-2015 Special Work & Technology Limited