Krishnakumar
Krishnakumar

Reputation: 73

Unable to take dump using mongodump

I have an atlas mongoDB and i have connected to the database through mongoshell using below the command.

mongosh “mongodb+srv://hostname.mongodb.net/?authSource=%24external&authMechanism=MONGODB-X509&retryWrites=true&w=majority” --tls --tlsCertificateKeyFile x5091248.pem

But i am unable to take database dump using mongodump command can someone share me the mongodump command for above scenario.

Upvotes: 0

Views: 101

Answers (1)

Wernfried Domscheit
Wernfried Domscheit

Reputation: 59563

Try to put all into the connection string. i.e

mongodb+srv://hostname.mongodb.net/?authSource=$external&authMechanism=MONGODB-X509&tls=true&tlsCertificateKeyFile=x5091248.pem 

You may also add parameter for CA-File like tlsCAFile=/etc/ssl/certs/ca-bundle.crt

I think retryWrites and w are not relevant for a dump.

Upvotes: 1

Related Questions