对现有大型 SVN 存储库进行重新分片
我们有一个相当大的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
svnadmin dump
和svnadmin load
可以解决问题吗? http://subversion.apache.org/faq.html#dumploadWill an
svnadmin dump
andsvnadmin load
do the trick? http://subversion.apache.org/faq.html#dumpload最好的方法是如上所述的转储/加载周期。但您可以尝试升级。
首先复制您的存储库尝试升级并测试它......(不要错过进行备份)。
The best way is as mentioned dump/load cylcle. But you can try the upgrade.
Make a copy of your repo first try the upgrade and test it....(don't miss to make a backup).
由于转储/恢复过程需要大量磁盘空间和处理时间,因此我(在 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:
svnadmin verify
before put it live