From MongoDB Atlas

Copying a MongoDB Atlas database to TeselaDB, step by step.

Copy a MongoDB Atlas database to TeselaDB. The process is the same as from MongoDB, with Atlas's mongodb+srv string to export.

Requirements

  • An Atlas user with read permission on the database.
  • The IP of the exporting machine in Atlas's access list.
  • A user with the restore role in TeselaDB.

Export from Atlas

Shell
mongodump --uri "mongodb+srv://user:<password>@cluster0.example.mongodb.net/shop" --gzip --archive=shop.gz

Import into TeselaDB

Shell
mongorestore --uri "mongodb://root:<password>@node-01:27017/?tls=true&tlsCAFile=./ca.pem" --gzip --archive=shop.gz

Atlas features that are not MongoDB's, such as Atlas triggers, are not copied; check which ones you use.

Check

The counts and indexes of each collection match Atlas's, except Atlas's search indexes, which mongodump does not copy and you have to create again in TeselaDB.

Common problems

  • mongodump does not connect because the machine's IP is not in Atlas's access list.
  • mongodump does not copy Atlas search indexes; create them again in TeselaDB.

See also