Tuesday, March 15, 2011

Copy SVN Repository

I have an SVN repo at a hosted SVN service which I need to move to our locally hosted SVN service. The host offers an export feature, which I've used. But how do I take that exported file and import it into a new repository?

EDIT

I tried using svnadmin load, but got an error message:

% svnadmin load . < ~/ss2_14066_rev36
svnadmin: Malformed dumpfile header

The service I'm exporting from is http://beanstalkapp.com, and their help page for export says this exported file can be reimported to another svn server. Is this possibly a server version mismatch?

From stackoverflow
  • If the export was created using svnadmin dump you can import it into a new, empty repository using

    # cd /path/to/new/repo
    # svnadmin load . < /path/to/dumpfile
    
    Ian : I get: svnadmin: Malformed dumpfile header I'm checking with the host to see what format this export is, exactly...
    Bombe : Yeah, if svnadmin doesn’t like it you should check back with your hosting service about what you’re supposed to do with the file.
    Ian : Thanks, looking at the file, something seems off. Marking this answer as correct as it would work if.. you know.. the file worked. :P
    tharkun : svn dump files are delicate things. make sure it's not been edited with a text editor or any other programm for the matter.
  • Is it possible that it's not a dumpfile but rather a tar.gz of the repository itself?

  • If your hosting provider uses Subversion 1.4 or later you can also use svnsync to create a copy from the repository.

    See The Subversion Book for more details.

0 comments:

Post a Comment