I am trying to do a
mongorestore
of a few collections . I am trying to use the Atlas URI to do this and it throws an error saying that
positional arguments not allowed: [mongodb+srv://hostname.mongodb.net]
When I try to connect with a mongo
client it works fine. However not the mongorestore
or mongo import.
In short
mongorestore -d dbname --username foo --password bar "mongodb+srv://hostname.mongodb.net" /folderwithbsons/
doesn't work while the below works
mongo -d dbname --username foo --password bar "mongodb+srv://hostname.mongodb.net"
Asked by Suresh C Nair
(1 rep)
Dec 13, 2021, 06:15 PM
Last activity: Dec 29, 2024, 06:00 AM
Last activity: Dec 29, 2024, 06:00 AM