I have to work behind a firewall, need to mongodump the course db

I was able to connect to the M220 course db through Atlas and get a dump to create a local copy on my machine.

This course only gives instructions about connecting through the shell. I have to work behind a firewall 99% of the time; i cannot whitelist your IP, i have already asked.

Without a way to work locally, i will have to drop the course.

Any help appreciated, thanks~

edit***

after much googling, this is the closest i have come

mongodump --host Cluster0-shard-0/cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017 --authenticationDatabase admin --ssl -u m121 -p aggregations

but throws this error:

2019-11-24T17:29:33.543-0800 Failed: error creating intents to dump: error getting collections for database citibike: (Unauthorized) not authorized on citibike to execute command { listCollections: 1, filter: {}, lsid: { id: UUID(“385e91fd-a7af-45c4-9db6-a1c97c8b1778”) }, $clusterTime: { clusterTime: Timestamp(1574645367, 7), signature: { hash: BinData(0, FDAB4AE789EBE7306EBC475AA2F39EE3965182E8), keyId: 6730992026675838977 } }, $db: “citibike”, $readPreference: { mode: “primary” } }

If you can ssh out, and I hope you can do at least that (otherwise it is a jail not a firewall :sunglasses: ) you may set up something on a AWS EC2 instance. You may also connect via your cell hotspot.

From what I recall, all the labs are run against the course Atlas data and there are no other dependencies. So if you have a local copy of the data in your local DB instance, you should be able to complete the labs and exams using your local copy on the localhost.

The only db you need is the aggregations db.

1 Like

yes, exactly. that is working for me in M220

**edit

Dude, you rock. That was the hint i needed

mongodump --host Cluster0-shard-0/cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017 --authenticationDatabase admin --ssl -u m121 -p aggregations --db aggregations

worked a charm :slight_smile:

2 Likes