How To: Move an SVN Repo

June 24, 2010

Example Details

Hotcopy or rsync the repository to the new location

original location: /usr/local/svn/miller
new location: /u1/svn_spill/miller

With svnhotcopy

svnadmin hotcopy /usr/local/svn/miller /u1/svn_spill/miller

With rsync

Ensure you have blocked access via apache to the repository that you are moving

### Use below config for moving repositories ###
<Location /svn/miller>
  Order Allow,Deny
  Deny from all

Now run the rsync command

rsync -ak /usr/local/svn/miller /u1/svn_spill/miller

Verify each repo is the same size

cd /usr/local/svn/miller
du -s
cd /u1/svn_spill/miller
du -s

If each was the same size, remove original repo

rm -R /usr/local/svn/miller

Symbolic Linking

Create symbolic link (in old repo location) to the new repo location

ln -s /u1/svn_spill/miller /usr/local/svn/miller


set proper permissions

chown -R svn:svn /u1/svn_spill/miller
chmod -R g+w /u1/svn_spill/miller


Browse your repo to make sure it works