liveBook · Manning

Atlas Cloud Backup

As explained in MongoDB 8.0 in Action, Third Edition

Atlas Cloud Backup is MongoDB Atlas's managed service for creating, storing, scheduling, and retaining cluster backups for restoration and recovery.

Atlas Cloud Backup is a managed way to protect MongoDB Atlas clusters against deletion, corruption, and other failures. It creates encrypted snapshots using AWS, Azure, or GCP snapshot capabilities. Backups remain in the cluster’s region; for a multiregion cluster, they are stored in its preferred region. You can set snapshot schedules and retention policies, including multiyear retention. section 21.1.1 section 21.5

Choose a backup approach based on cluster tier and recovery needs:

  • M0 free clusters cannot use Cloud Backup. Use mongodump and mongorestore instead, accounting for their Atlas-specific option limits and the cost of exporting large databases. section 21.1.1 section 21.1.2
  • Flex clusters receive automatic daily snapshots beginning 24 hours after setup, but do not support on-demand snapshots. section 21.5
  • M10 and higher clusters support scheduled and on-demand snapshots. Continuous backup adds point-in-time recovery within a configured retention window, potentially at higher storage and processing cost. section 21.5
atlas cluster create "MongoDB-in-Action-M10" \
--backup --provider GCP --region CENTRAL_US \
--tier M10

Create an M10 cluster on GCP with backups enabled using the Atlas CLI. section 21.1.1

atlas backups snapshots create "MongoDB-in-Action-M10" \
--desc "Atlas on-demand"
Snapshot '66731653c782c81efb877f7e' created.

Create an on-demand snapshot when you need a backup outside the scheduled cycle. The returned snapshot ID identifies it for later restore operations. section 21.1.1 section 21.1.2

A restore can return data to the original cluster or load it into another cluster for testing or disaster-recovery preparation. For a Cloud Backup restore, Atlas first removes the target cluster’s existing data, then loads the snapshot or replays changes to the selected backup point. The target is temporarily offline during this process. Test restores regularly rather than discovering problems during an incident. section 21.1.2

atlas backups restores start automated \
--clusterName "MongoDB-in-Action-M10" \
--targetClusterName "MongoDB-in-Action-M10" \
--snapshotId 6725be13eae896510f35a553 \
--targetProjectId 65d70c5bc9b5633e80a9c998

Start an automated restore to the original cluster by supplying its name, a snapshot ID, and the target project ID. Because the target’s existing data is removed, verify the destination before running it. section 21.1.2

If external key-management integration is enabled, a restore also requires the relevant cloud key and identity credentials. For M0, mongorestore replaces the Cloud Backup workflow but cannot provide its point-in-time restore option. section 21.1.1 section 21.5

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Walks through cluster creation, snapshot commands, and restore paths, but does not explain cloud-provider snapshot internals.
Examples
Uses Atlas CLI commands to create a backup-enabled GCP M10 cluster, take an on-demand snapshot, and start an automated restore.
What it assumes
Assumes an Atlas cluster while distinguishing M0, Flex, and M10 backup capabilities.
What you can do after
Operate/configure Atlas backups by selecting eligible cluster options, creating snapshots, and restoring to an appropriate target.
How it connects
Connects snapshots, retention policies, point-in-time recovery, encryption key management, mongodump, and mongorestore.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.