liveBook · Manning

Continuous backup

As explained in MongoDB 8.0 in Action, Third Edition

Continuous cloud backup continuously captures database changes and write history to support restoration to a selected point within a retention window.

Continuous cloud backup lets an Atlas cluster return to a selected moment within a retention window. It captures the oplog—a record of write operations—so recovery is not limited to the times when snapshots were taken. section 21.1.1

A point-in-time restore starts with the latest backup snapshot and replays captured oplog entries up to the chosen time. This can undo an accidental deletion or unwanted change while retaining earlier writes. section 21.1.2 section 21.5

For an Atlas restore:

  • Use an M10-or-higher dedicated cluster, and choose a retention window that meets your recovery needs. Continuous backup can add storage and processing costs. section 21.1.2 section 21.5
  • Select a time within that window, then supply the source cluster, target cluster, target project ID, and UNIX timestamp to the Atlas CLI. section 21.1.2
  • Watch the restore job with `atlas backups restores watch <restore job id> --clusterName <cluster name>`. section 21.1.2
atlas backups restores start pointInTime \
    --clusterName MongoDB-in-Action-M10 \
    --pointInTimeUTCSeconds 1588523147 \
    --targetClusterName myRestoreDemo \
    --targetProjectId 1a2345b67c8e9a12f3456de7

The point-in-time CLI example shows the required flags. Replace its sample timestamp, cluster names, and project ID with values for your restore; the selected time must fall within the retention window. section 21.1.2

Atlas stores captured oplog data in the cloud provider’s object storage: Amazon S3, Azure Blob Storage, or Google Cloud Storage. Backups can also be encrypted with a customer-managed key from the provider’s KMS. section 21.1.1

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains snapshot-based oplog replay and shows a restore command, but defers continuous-backup setup details to documentation.
Examples
Shows an Atlas CLI point-in-time restore specifying a UNIX timestamp, source cluster, target cluster, and target project.
What it assumes
Requires an M10-or-higher dedicated Atlas cluster for continuous cloud backup and point-in-time restoration.
What you can do after
Apply it via the Atlas CLI to request and monitor a restore to a selected time within the retention window.
How it connects
Links the oplog, backup snapshots, point-in-time recovery, and retention policies.

Also explained in

Compare how 2 books explain continuous backup →

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.