How to perform backups via CLI

I’m looking to implement a task that will take a backup of my Atlas Cluster to our companies backup repos.

Reviewing the documentation, I can see I have a few options but wanted to understand which options would be best suited to a backup scenario.

Option 1: Atlas DB Exports:
https://www.mongodb.com/docs/atlas/cli/stable/command/atlas-backups-exports-jobs/#std-label-atlas-backups-exports-jobs

Option 2: MonogDump: | https://www.mongodb.com/docs/database-tools/mongodump/

How will the backups be taking place?
The backup tool I currently using does not work directly with Mongo Atlas. I am looking to run a cron job on a Linux endpoint that will perform that export, from there I will backup the directory with exported databases.

Export jobs seem like the best option but the documentation does not go in depth about how to configure these, making it hard to understand if that is the right solution. What I am looking for is a detailed breakdown of how to configure and manage the export jobs.

The Monogo Dump seems very similar to the mysqldump but it was not clear if that only works for locally hosted Monog instances or if that would also for for Atlas instances.

Any recommendations or additional resources I can review would be a great help.

Cheers

mongodump works against any MongoDB instance but for security and performance reasons it would be better to leverage your cloud backup instead. There is additional information on the Atlas CLI syntax available here https://www.mongodb.com/docs/atlas/backup/cloud-backup/export/#export-management

1 Like