我在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?
发布评论