I am unable to connect Atlas MongoDB while using --host
option, But i'm able to connect while using --uri
option where did i made a mistake?
For example:
--uri option It's working fine
mongodump --uri="mongodb+srv://<username>:<password>@<hostname>/<dbname>" --gzip --out=/dir1/dir2
--host option getting error like
Failed: error connecting to db server: no reachable servers
mongodump --host <hostname>:<port> --username <username> --password <password> --authenticationDatabase <dbusername> --gzip --db <dbname> --out /dir/dir2