views:

458

answers:

2

I created a local repository using tortoiseSVN a while back. Now I would like to migrate the repository to my DreamHost account.

I moved the files over but it seems that DreamHost is using an older version of SVN.

when I issue the command

svnadmin load 'repository dir'

it spits back

svnadmin: Expected FS format '2'; found format '4'

Solution?

+2  A: 

Edit: Your message is due to the fact you have created the destination repository with the newer version of the server, then tried to load the dump with the older version of svnadmin. Read below for the correct procedure.


I don't understand the svnadmin load part, have you created a dump file before with svnadmin dump? That's your best option to port a repository across versions as normally the format should not change.

So you should do, on the version using the original repository (newest SVN version):

svnadmin dump <repos_path> > dump_file

and on the destination server (oldest SVN version):

svnadmin create <newrepos_path>
svnadmin load <newrepos_path> < dump_file

You may want to use the --deltas option in the dump if you have a big repository, as those dumps can get pretty big.

If that's what you did and it failed, could you precise the respective versions and give a few more details?

RedGlyph
A: 

If dumping is not working, you can also try an svnsync to migrate the contents to your new Repository: After creation of your DreamHost Repository, create a simple pre-revprop-change hook which just exits 0, to enable propchanges:

#!/bin/sh
exit 0

After this you can start:

svnsync init [DREAMHOST_URL] [OWN_REPO_URL]

svnsync sync [DREAMHOST_URL]

Then all revisions will flow to your new repository..

Peter Parker
According to the SVN documentation, there shouldn't be back-compatibility issues since version 1.0, though I have never tried. But the '4' in the OP's description is weird, and from the command they give it is not clear what exactly has been done... I wish there were some kind of reply (ref dump: http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate)
RedGlyph
The dump format changed overtime. So an svn 1.1 client is not able to understand the dump format from an svn 1.6 client. That is precisely the problem he reported
Peter Parker
Actually, I'm almost sure that what he reported was a failure of svnadmin "old version" to load a dump into a repository created by svnadmin "new version". I should have seen that before. I've done a quick migration test of a dump from 1.6 -> 1.4 and it works like a charm :-)
RedGlyph