Mongo Restore无法恢复具有相同名称的时间系列系列

发布于 2025-01-28 15:54:55 字数 475 浏览 3 评论 0 原文

我在MongoDB Lives示例集合中有一个时间表集合,我试图从此集合中转载一些文档,然后以 mongorestore 稍后将其恢复到同一时间系列系列集合 Livesemples

问题是使用 mongorestore 它不允许还原到现有时间序列,因此它要求使用 - drop 集合中的现有数据。

请注意,这可以在普通集合中起作用,但在时间表的coleLtion中不起作用。

这在 mongoexport mongoimport 中起作用,但事实是,我使用 mongodump and mongorestore 压缩的功能。对 gzip 的文档对我来说至关重要。

我该如何克服这一点?

I have a timeseries collection in mongodb liveSamples collection, I'm trying to dump some documents from this collection and then restore it later with mongorestore to the same time series collection liveSamples.

The problem is that using mongorestore it doesn't allow to restore to an existing time series, so it asks to use --drop, but if i use drop ill lose all existing data in the collection.

notice that this works in a normal collection but not in a timeseries colelction.

This works in mongoexport and mongoimport, but the thing is that im using the capability of mongodump and mongorestore to compress the documents to gzip which is very critical for me.

How can i overcome this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文