开发者

How do I migrate a newer SVN repository to an older version?

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'

开发者_如何学JAVA

Solution?


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?


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..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜