Skip to content

Restore a MongoDB Atlas collection using Compass

Import a MongoDB collection into Atlas using the Compass GUI.

MongoDB Compass is the official GUI for MongoDB. You can use it to import a JSON collection file into any database on your Atlas cluster without using the command line. This is useful when you want to restore a single collection rather than an entire database dump.

Get your Atlas connection string

  1. Go to cloud.mongodb.com, select your cluster, and click Connect.

MongoDB Atlas cluster list with the Connect button highlighted

  1. Choose Connect using MongoDB Compass from the list of connection options.

The connection options list with MongoDB Compass selected

  1. Copy the connection string shown at the bottom of the screen.

The connection string on the Compass connection screen

Connect Compass to Atlas

Paste the connection string into MongoDB Compass. Replace <password> in the string with the actual password for your Atlas user before connecting.

MongoDB Compass with the connection string filled in

Import the collection

Once connected, your databases appear in the left sidebar. Select the target database and collection, then click ADD DATA and choose Import File.

The ADD DATA menu with Import File highlighted

Select the JSON file you want to import and confirm. Compass imports the documents into the selected collection.

The file import dialog in MongoDB Compass