Data that never changes
Immutable data is written once and never modified. To change a value you write a new version and leave the old one intact. This makes reasoning simple, enables safe sharing without locks, and lets the system keep history.
What a snapshot is
A snapshot is a consistent, read only view of data as it existed at one instant. Because the underlying data is immutable, a snapshot is just a reference to the set of versions that were current at that moment.
Copy on write
Naively copying all data for each snapshot would be wasteful. Instead systems use copy on write: the snapshot shares existing blocks with the live data. Only when a block is later modified does the system write a new copy, leaving the snapshot pointing at the original. Snapshots therefore cost almost nothing to create.
What snapshots buy you
- Backups taken from a stable view while writes continue.
- Rollback to a known good state after a bad change.
- Reproducibility because a reader can pin a version.
Key idea
Immutability plus copy on write let a system create cheap point in time snapshots that share unchanged blocks, giving stable backups and rollback without duplicating all the data.