Mongodump will not fulfill the collection request

I run the following command in a box, which is part of a set of completed replicas. I'm just trying to export from this particular fragment, I will run the same command on a different fragment.

When I do this, Mongo should dump a maximum of 1.72 million records, but instead, it looks like he is trying to export a total of 590 million records in the collection. Why doesn't the query apply and export only my data selection?

mongodump -d obscured -c message --query "{sendDate: {\$gt: 1380499200}}" \ --out=da1-messagedump --port=27018 

Any help would be greatly appreciated.

+6
source share
1 answer

Have a look at the documentation?

MongoDB Docs

As I do not know what steps you are following, it is difficult to guess. But obviously, you need to freeze each member of the shard before exporting.

+1
source

Source: https://habr.com/ru/post/953946/


All Articles