Upgrading Subversion Repositories using dump / load

Subversion 1.5 has been out for a while now, and has some nice new features so in this post I’ll describe a nice reliable and safe method of upgrading your repositories.

Experience has shown me that the best method is to use the command line tools, specifically svnadmin.

> svnadmin dump oldrepo > oldrepo.txt

The command ’svnadmin dump’ creates a plain text file of all your revision. Included in this is a hash of each revision to check against once you start your import process.

Be careful not to forget to pipe the output into a file, if you don’t you will get a lot of  text flooding your terminal very quickly.

Now create your new version 1.5 repositoy, again using svnadmin.

> svnadmin create newrepo

We can now import our old revisions into the new 1.5 repository using ’svnadmin load’

> svnadmin load newrepo < oldrepo.txt

Svnadmin will report on screen any problems and show its progress. The process is very quick and normally takes a matter of minuites for anything other than the largest repositories.


About this entry