从 Sonatype Nexus 中清除旧索引
我们使用 Sonatype 的 Nexus 1.9.2.2 来代理 Maven 存储库。我们的问题是索引占用了太多的磁盘空间。我们所有的存储库占用了大约 25GB 的空间,并且还在不断增长。
例如,该目录有大约 4GB 的索引文件,如下所示:
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.825.gz
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.826.gz
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.827.gz
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.828.gz
...
是否有任何干净的方法来清除这些文件?例如使用计划任务?
提前致谢!
We're using Sonatype's Nexus 1.9.2.2 for proxying maven repositories. Our problem is that the indexes are eating so much disk space. All our repositories are taking about 25GB space, and growing.
For example, this directory has ~4GB of index files like this:
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.825.gz
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.826.gz
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.827.gz
sonatype-work/nexus/storage/mvnsearch/.index/nexus-maven-repository-index.828.gz
...
Is there any clean way of purging those files? For example using a scheduled task?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们每周运行“优化存储库索引”,并且每小时运行“清空垃圾”任务。
我可以告诉你,存储对我们来说不是索引的问题。我们在这些 .index 目录中有大量文件,但它们的大小都在 1K 以下......即使对于我们的中央代理存储库也是如此。我们的总数约为 1GB。
然而,我们的仓库相当大。不过,我们有大量的文物。目前我们的存储库磁盘空间接近 300GB。
We run the "optimize repository index" weekly and also run the "empty trash" task hourly.
I can tell you that storage isn't an issue for us for indexes. We have a ton of files in those .index directories, but they're all under 1K in size...even for our central proxy repo. Our total comes in ~1GB.
However, our repo is quite large. We've got a very large number of artifacts though. We're currently at almost 300GB in repository disk space.
偶然发现了同样的问题,甚至尝试与 Sonatype 交谈。
他们告诉我只需删除文件并重建索引。
Stumbled on the same issue, even tried to talk with Sonatype.
They told me to just delete the files and rebuild the indices.