Manoj Madushanka
Manoj Madushanka

Reputation: 461

mongodump command not works for mongodb version 6.0.14

I am trying to dget the mongo database dump. below is my command

mongodump --uri mongodb+srv://<user>:<password>@<dbHost>/<dbName> --forceTableScan --collection <collectionName> --out <outputDirectory>

when I use above command for mongoDB version 4.4.29 it is generating database dump to my output directory. But it is not working for mongoDB version 6.0.14. I am getting below error when I execute command for mongoDB 6.0.14 database

2024-02-29T17:44:46.645+0530    Failed: error getting collection options: error running `listCollections`. Database: `testDb` Err: Unsupported OP_QUERY command: listCollections. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal

Can anyone help me to fix this issue please? I am using ubuntu version 20.04

Upvotes: 0

Views: 162

Answers (0)

Related Questions