Backup & Restore: Snapshots & Incremental Backups
Learn how Cassandra's snapshot and incremental backup mechanisms work, and how to restore data from them.
Backing up Cassandra is unusually simple, because SSTables are never modified. A file that exists now will be byte-identical later or gone entirely.
A snapshot is like instantly stapling a copy of your current filing cabinet's folder list to a separate binder without duplicating the paper itself, since the pages don't actually move — but once you start shredding and replacing pages in the live cabinet, the binder's stapled copies become the only remaining originals. Incremental backups are like automatically stapling a copy of every new page into that binder the moment it's filed, so you can reconstruct anything added since your last full snapshot.
Key Concepts
data/shop/orders/ nb-1-big-Data.db <- the real file
.../snapshots/tag/ nb-1-big-Data.db <- another name for the same blocks day 0: snapshot taken, 0 extra bytes
day 7: most of those SSTables compacted away
-> the snapshot now holds the only reference
-> its full size is now genuinely occupied