Sample Header Ad - 728x90

How to do a mongo restore with Atlas URI

0 votes
1 answer
2218 views
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