Import MongoDB DataSet for M001 [For Offline Access]

Hi Everyone,

If you want offline data and import to your own cluster. Here is the dataset that you can import in your mongo shell.

For importing, unzip the main dump file and then from that directory, use mongorestore command. Like, I will run mongorestore from the Downloads directory if my dump folder is in Downloads/dump. [/Users/kanika/Downloads/dump]

Example for mongorestore (If you have just downloaded and installed. Mongod is running without authentication.) Simplest way would be like this:

/Users/kanika/Downloads:~$ mongorestore --host localhost --gzip

One example of mongorestore is [ This example is for users who have created their own sandbox cluster on cloud.mongodb.com ]:

/Users/kanika/Downloads:~$ mongorestore --host <REPLICA SET>/<SEED LIST> --ssl --username <USERNAME> --password <PASSWORD> --authenticationDatabase <AUTHENTICATION DATABASE> --gzip

–gzip is important as the dumps are compressed.
REPLICA SET is Replica Set Name like ‘Cluster0-shard-0’
SEED LIST is hostname for all your 3 nodes like “cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017

Here is link for mongorestore documentation.

Please let me know if you need more information.

Thanks, Kanika

5 Likes