HOWTO migrate a subversion repository to a new host
I recently had to migrate a SVN repo to a new host aswell as moving it’s location on the server, this is how I did it.
On the existing server we’ll need to make a backup of the subversion repo:
$ svnadmin dump /home/current_repo_location > my_repo.dump
$ tar -zcvf /root/my_repo.tar.gz my_repo.dump
Depending on the size and age of your repository these two commands could take some time to complete.
Now log in to your to your new server
$ rsync -v -r –ignore-existing –delete -e ssh root@xxx:/root/my_repo.tar.gz /home/new_location/
$ tar -zxvvf /root/my_repo.tar.gz
$ svnadmin load my_repo.dump /home/new_location
$ cd /home/new_location
$ find . -path \*.svn/entries -exec perl -spi -le ‘s#current_location/project_name#new_location/project_name#’ ‘{}’ \;
That should do it.



No Comments Comments Feed
Add a Comment