How to migrate SVN repository?

There are only few easy steps to migrate svn repository. This post is for my own notes, in case i forget how to migrate svn repository again!
Below is the steps to migrate SVN repository:-
- Start your terminal
$ svnadmin dump /path/to/your/repo > yourreporname.dump
$ scp yourreponame.dump username@new.machine.ip:/path/to/your/new/repo
This steps is to transfer your dump file to your new machine. You will prompt to enter password for the new machine.
- Now your SVN dump file should be in new machine
- Login to your new machine
cd /path/to/your/new/repo
svnadmin create reponame
svnadmin load reponame < yourreponame.dump
- Done, you just just migrated your svn repository
* If you dump file is too big for transfer, you can compress it using tar before sending over thru network.
Tar command for compress:
tar -zcf yourreponame.tgz yourreponame.dump
Tar command for uncompress:
tar -zxf yourreporname.tgz
Tags: backup svn, migrate svn, software versioning, svn, svn migration, svnadmin dump, svnadmin load
Posted at July 20th, 2008 by chua
If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)



November 6th, 2008 at 4:25 am
small typo:
scp yourreponame.dump username:new.machine.ip:/path/to/your/new/repo
should be:
scp yourreponame.dump username@new.machine.ip:/path/to/your/new/repo
November 6th, 2008 at 9:29 am
thanks doug schlenker for the correction!