Migrating Subversion repositories to other servers
Written by Sam Moffatt   
Sunday, 10 June 2007 01:45
This document covers some recommended steps to be complete when either migrating a repository or creating a new repository where existing users of an old repository will require access to the new server.
Migrating a Repository
All documentation appears to show that moving a repository (after all of the Subversion configuration within the system is complete, such as adding users and groups) to a new server should merely involve tarballing the existing directory and deploying to the new location. The relevant commands (see SVN configuration document; not presently available) may need to be reapplied to get the directory permissions restored properly (i.e. altering user ID's and sticky bits). Once this is completed, the repository should be accessible on this server, using svnlook to examine the repository should be a suitable check.

Migrating Users
If users have been configured to use SSH keys, they can be easily migrated to a new server without any alteration (apart from changing the repository address information) on the client side (i.e. no alterations required to pageant operation). To do this, a user must first be created (with the same username, etc) on the new server and the directory ".ssh" created if it doesn't already exist. On the old server, the user should also have a ".ssh" folder containing a file called "authorized_keys". This file needs to recreated exactly the same on the new server (simply using "vi" to view, copy and paste the file into another "vi" session using purely PuTTY will work fine). When the user switches over, the old key (and authorization installed in pageant) will work to provide access to the new repository. Of course, the user needs to be added to the relevant SVN groups as per the SVN user creation document (Not presently online).
Last Updated on Saturday, 31 May 2008 04:50