liveBook · Manning

Snapshot

As explained in MongoDB 8.0 in Action, Third Edition

A backup snapshot is a stored point-in-time copy of a database deployment's data for recovery.

A snapshot is a stored point-in-time copy of database data used to preserve consistent recovery points. WiredTiger uses MVCC to provide a consistent view, then writes snapshot data into durable checkpoints across data files. section 8.1.1

Use snapshots with these operational considerations:

  • MongoDB schedules checkpoints every 60 seconds; the previous checkpoint remains valid until metadata is atomically updated. section 8.1.1
  • Increase minSnapshotHistoryWindowInSeconds when longer snapshot history is needed, but expect greater disk usage in high-volume environments. section 8.1.1
  • Restore Atlas clusters from scheduled or on-demand snapshots, optionally targeting another cluster for testing or disaster recovery. section 21.1.2
  • Expect Atlas restoration to clear the target, load the snapshot or replay oplog entries, take the cluster offline, and bring it back after verification. section 21.1.2
  • Use mongodump and mongorestore for M0 clusters because free M0 clusters do not provide cloud backup snapshots. section 21.1.2

Restore a snapshot to another Atlas cluster

Run `atlas backups restores start automated --clusterName "MongoDB-in-Action-M10" --targetClusterName "MongoDB-in-Action-M10" --snapshotId 6725be13eae896510f35a553 --targetProjectId 65d70c5bc9b5633e80a9c998` to initiate an automated restore using a selected snapshot.

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

Browse a complete Atlas CLI command for restoring a snapshot to a target cluster. section 21.1.2

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains MVCC consistency, durable checkpoints, retention costs, and Atlas restoration workflow.
Examples
Uses 60-second checkpoints, retention settings, Atlas CLI restore commands, alternate clusters, and M0 dump restoration.
What you can do after
Operate Atlas snapshot restores and reason about checkpoint retention, recovery points, and M0 restoration alternatives.
How it connects
Connects snapshots with MVCC, checkpoints, Cloud Backup, oplog replay, mongodump, mongorestore, and disaster recovery.

Also explained in

Compare how 11 books explain snapshot →

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.