Importing a SVN Dump File

I recently had a need to view some source code that I have stored online in a Subversion host. Trouble is, I haven’t used Subversion for a long time now (Git rules!) and I couldn’t remember how to import the dump file that I’d asked the host to create for me into a local repository. Why not just checkout the repository? Well, at work we don’t use Subversion (TFS, oh joy!) and even after installing it I discovered that it was blocked by the proxy server. I didn’t want to wait around for an admin to open it up for me so a dump file was my next best choice.

Turns out the answer is to use the svnadmin tool (which is included with Visual SVN Server) with the following format:

svnadmin load “path-to-repository” < "path-to-dumpfile"

Once you've got your dump file make sure you uncompress it if necessary, then from the commandline run:

svnadmin load "c:\repositories\myapp" < "c:\myapp.dump"

Just for completeness, in order to backup your SVN repository you can create your own dump file by using the following commmand:

svnadmin dump "c:\repositories\myapp" > "c:\myapp.dump"

and that's it!

Advertisements
Importing a SVN Dump File