Migration of Subversion Repository without Admin Access

Date: October 27th, 2006 by Author: Daniel Elstner

Tonight I had to move two project directories from a public Subversion repository over to a private server. Usually, to do this you’d dump the whole thing with svnadmin into one flat file and load it again at the new location. But to run svnadmin you need shell access to the Subversion server.

However, given that there are lots of tools around with names like cvs2svn I figured that something similar might exist for plain svn to svn migration. So I tried my luck and googled for “svn2svn”, and behold — I struck gold. It’s a hack and puts a quite heavy load on the server in order to retrieve the difference of every single revision to the next. But it worked like a charm:

  • mkdir tmp; cd tmp
  • svn mkdir http://destination/directory
  • ruby svn2svn.rb http://source/directory http://destination/directory

That’s really all there is to it. The project directory is now at its new location, and has its history preserved. Many thanks to choonkeat for sharing his work!

Comments are closed.