Migrating SVN repository data

Migrating the data is very simple, you can do this via svnsync but here it how to use a svn dump file:

* All the repos should be addressed using a path. e.g. /srv/svn/repo

Two liner:
$ svnadmin create newrepo
$ svnadmin dump oldrepo | svnadmin load newrepo

Or you can keep a dump file

  1. Dump your old repository to a file:
    $ svnadmin dump oldrepo > oldrepo.svndump
  2. Create your new repository:
    $ svnadmin create newrepo
  3. Load & rock:
    $ svnadmin load newrepo < oldrepo.svndump

You can have more fun using this method, such as specify a revision range or merge different repositories. See the SVN book for yourself 🙂

Summerised from the SVN book: http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate

Leave a Reply

Your email address will not be published. Required fields are marked *