Unable to do mongodump or mongoexport from AWS DocumentDB instance

0

When i try to do mongodump, I am getting the below error: Failed: error creating intents to dump: error creating intents for database <db>: error counting <db>.<col>: Aggregation stage not supported: '$collStats'

According to https://docs.aws.amazon.com/documentdb/latest/developerguide/backup_restore-dump_restore_import_export_data.html - versions less than 100.6.1 should be fine, but still no success.

I downgraded both mongo and mongodump versions to the below ones: mongodump version: 100.4.0 mongod version v4.4.25

Gowtham
已提问 7 个月前365 查看次数
1 回答
-1

Kindly note that, the "$collStats" Stage Operator is not supported in any DocumentDB version currently. This is also mentioned in the document below[1].

[1] https://docs.aws.amazon.com/documentdb/latest/developerguide/mongo-apis.html#mongo-apis-aggregation-pipeline-stage

Having said that, currently there is no alternative for passing aggregated functions or combining outputs of two stages in aggregate query in DocDB. Please be aware, you will have to use separate queries and re-structure the same to mitigate this issue.

Going forward, you can keep an eye on AWS announcements [2], as all new releases in DocumentDB would be posted here.

[2] AWS updates: https://aws.amazon.com/about-aws/whats-new/2023/

AWS
支持工程师
Ruchi_P
已回答 7 个月前
  • Hi Ruchi, Issue is I am not able to do mongodump or mongoexport as per the guide I have linked in the question. I am not trying to use the $collStats operator, rather mongodump/mongoexport is throwing the said error.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则