Importing data from MongoDB Atlas Cluster to my local installation

Hello,

I’ve manage to install mongodbl and manage to log on to my mongodb atlas cluster through the local shell. How an I download my mongodb atlas to my local computer?

There’s a lot of documentation in regards to how to create json and bson export/imports but this seems to all stem from in inside the cloud installation. How to move files in and out of the cloud?

Thanks,

Both mongodump


and mongoexport

create files on your local computer.

Yes. I already knew that. Once it’s created. How do I download it, transfer it to another computer,etc?

If you are able to connect to the cluster from your local host you can try command line mongoexport with host or uri options
Then use mongoimport to load into your local mongodb

The dump will be created on your pc

or you can use Compass also
You can also get some dumps from our forum threads but i am not sure how current that data is
What db/collections you are trying to get?

You do not need to download it. It is

You may transfer it to another computer the same way you transfer any other file, email dropbox, OneDrive, Google Drive, ssh, ftp …

If you want to load this data into another mongodb instance the operations are


or

Hi @Ken_Mathieu_Beaudin,

I believe the confusion may be that, for having the data locally, you need mongodb-tools installed in your computer.

So, just as a guide, I’d do this:

  1. Install mongodb-tools for your OS
  2. Gather the uri from Atlas --> connect
    a. Run mongoexport for a collection
  3. Inspect the JSON data with any Code editor

Once you get the hang of how it works, try mongodump.

Next, use mongorestore to send it to any other Mongo Database.

Read the docs, because many overwrittings (dump), and rejections due to same _id fields can occur.