views:

2331

answers:

3

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?

+3  A: 

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
Bombe
I get:svnadmin: Malformed dumpfile headerI'm checking with the host to see what format this export is, exactly...
Ian
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.
Bombe
Thanks, looking at the file, something seems off. Marking this answer as correct as it would work if.. you know.. the file worked. :P
Ian
svn dump files are delicate things. make sure it's not been edited with a text editor or any other programm for the matter.
tharkun
+1  A: 

Is it possible that it's not a dumpfile but rather a tar.gz of the repository itself?

Andy
+3  A: 

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.

Bert Huijben