对现有大型 SVN 存储库进行重新分片

发布于 2024-09-29 13:45:48 字数 391 浏览 2 评论 0原文

我们有一个相当大的 SVN 存储库(50 GB,超过 100000 个修订)。使用它的速度相当慢,我的猜测是,其原因是 db/revs 和 db/revprops 中的平面目录结构(其中每个修订版都是一个文件)。

我们在 SVN 1.5(在 Linux 服务器上)中使用 FSFS 格式,但存储库是使用较旧的 SVN 版本创建的。现在我读到 SVN 1.5 支持“分片”,并且我了解到此功能将修订版分发到多个目录中,因此单个目录不会包含这么多文件。这听起来非常有用,但不幸的是,该功能似乎仅适用于使用 SVN 1.5 新创建的存储库。

如何将现有的大型线性存储库转换为分片存储库?该手册提到了工具“fsfs-reshard.py”,但该脚本显示“该脚本尚未完成,尚未准备好用于实时数据。相信我们。”。所以我绝对不想用它。还有其他选择吗?

we have a a pretty large SVN repository (50 GB, Over 100000 revisions). Working with it is pretty slow and my guess is that the reason for this is the flat directory structure in db/revs and db/revprops (Where each revision is one file).

We use the FSFS format with SVN 1.5 (On a linux server) but the repo was created with an older SVN version. Now I read that SVN 1.5 supports "sharding" and I understood that this feature distributes the revisions into multiple directories so a single directory doesn't contain so many files. This sounds pretty useful but unfortunately it looks like this feature is only used with repositories which are freshly created with SVN 1.5.

How can I convert a large existing linear repo to a sharded repo? The manual mentions the tool "fsfs-reshard.py" but this script says "This script is unfinished and not ready to be used on live data. Trust us.". So I definitely don't want to use that. Is there an alternative?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

羅雙樹 2024-10-06 13:45:48

svnadmin dumpsvnadmin load 可以解决问题吗? http://subversion.apache.org/faq.html#dumpload

Will an svnadmin dump and svnadmin load do the trick? http://subversion.apache.org/faq.html#dumpload

独守阴晴ぅ圆缺 2024-10-06 13:45:48

最好的方法是如上所述的转储/加载周期。但您可以尝试升级

svnadmin upgrade

首先复制您的存储库尝试升级并测试它......(不要错过进行备份)。

The best way is as mentioned dump/load cylcle. But you can try the upgrade.

svnadmin upgrade

Make a copy of your repo first try the upgrade and test it....(don't miss to make a backup).

玩世 2024-10-06 13:45:48

由于转储/恢复过程需要大量磁盘空间和处理时间,因此我(在 2010 年)发布了 fsfs-reshard.py 的改进版本,其中包括对 Subversion 1.6 FSFS 格式 5 的支持:
https://github.com/ymartin59/svn-fsfs-reshard

支持切换线性到分片布局,在需要时拆包分片。由于分片统计计算,您可以预期打包修订大小选择适当的分片大小。

当然,必须谨慎使用

  • 如果可能的话,首先在存储库副本上测试过程
  • 准备好恢复备份
  • 在处理时防止访问存储库
  • 运行svnadmin verify然后将其投入使用

Because dump/restore process requires lot of disk space and processing time, I have published (in 2010) an improved version of fsfs-reshard.py which includes support for Subversion 1.6 FSFS format 5:
https://github.com/ymartin59/svn-fsfs-reshard

It supports switch between linear to sharded layouts, unpacking shards when required. Thanks to shard statistics computation, you may anticipate packed revision sizes selecting appropriate shard size.

Of course it must be used with care:

  • First test procedure on a repository copy if possible
  • Get a backup ready to be restored
  • Prevent access to repository when processing
  • Run svnadmin verify before put it live
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文