无法从AWS DocumentDB实例执行mongodump或mongoexport的问题求助
mongodump执行报错:不支持
$collStats聚合阶段 错误信息
Failed: error creating intents to dump: error creating intents for database
: error counting .: Aggregation stage not supported: '$collStats'
报错原因
当前所有AWS DocumentDB版本均不支持$collStats聚合阶段操作符,而mongodump默认会调用该操作符统计集合信息,因此触发报错。
解决方法
执行mongodump时添加--forceTableScan参数,跳过$collStats阶段,改用全表扫描方式完成数据导出:
mongodump --forceTableScan --db <db> --collection <col> [其他参数]
内容的提问来源于stack exchange,提问作者Chathuranga Kasthuriarachchi
相关产品推荐
相关产品推荐

