When I create backup of all databases in MongoDB (version 3):
mongodump --username bacUser --password 12345
It\'s OK. But when I try to cre
If you use the --uri
option, you need to add authSource=admin as a parameter to your connection string (assuming your user is on the admin database)
mongodump --uri="mongodb://user:pass@host1:27017,host2:27017,host3:27017/?replicaSet=rs0"
Becomes:
mongodump --db=test --uri="mongodb://user:pass@host1:27017,host2:27017,host3:27017/?replicaSet=rs0&authSoource=admin"