如何将较新的 SVN 存储库迁移到较旧的版本?
我不久前使用 tortoiseSVN 创建了一个本地存储库。 现在我想将存储库迁移到我的 DreamHost 帐户。
我将文件移过来,但 DreamHost 似乎正在使用旧版本的 SVN。
当我发出命令时
svnadmin load 'repository dir'
它会返回
svnadmin:预期的 FS 格式为“2”; 找到格式“4”
解决方案?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
编辑:您的消息是由于您使用较新版本的服务器创建了目标存储库,然后尝试使用较旧<的服务器版本加载转储/strong>
svnadmin
版本。请阅读以下内容了解正确的步骤。我不明白 svnadmin load 部分,您之前是否使用 svnadmin dump 创建了转储文件?这是跨版本移植存储库的最佳选择,因为通常格式不应更改。
因此,您应该在使用原始存储库的版本(最新的 SVN 版本)上执行以下操作:
在目标服务器上(最旧的 SVN 版本):
您可能需要在转储中使用
--deltas
选项,如果你有一个很大的存储库,因为这些转储可能会变得相当大。如果您就是这么做的但失败了,您能否精确说明各个版本并提供更多详细信息?
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 withsvnadmin 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):
and on the destination server (oldest SVN version):
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?
如果转储不起作用,您还可以尝试 svnsync 将内容迁移到新存储库:
创建 DreamHost 存储库后,创建一个简单的 pre-revprop-change 钩子,该钩子仅退出 0,以启用 propchanges:
此后您可以开始:
然后所有修订将流向您的新存储库。
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:
After this you can start:
Then all revisions will flow to your new repository..