1. Taking a snapshot
$ nodetool -h localhost -p 7999 snapshot test
The snapshot is created in data_directory_location/keyspace_name/table_name/snapshots/snapshot_name directory. Each snapshot directory contains numerous .db files that contain the data at the time of the snapshot.
For example:
Packaged installs:
/var/lib/cassandra/data/mykeyspace/mytable/snapshots/23939834298/mykeyspace.db
Tarball installs:
install_location/data/data/mykeyspace/mytable/snapshots/23939834298/mykeyspace.db
Deleting snapshot files
Enabling incremental backups
Restoring from a Snapshot
1. Shut down the node.
2. Clear all files in the commitlog directory:
Packaged installs: /var/lib/cassandra/commitlog
Tarball installs: install_location/data/commitlog
3. Delete all *.db files in data_directory_location/keyspace_name/table_name directory, but DO NOT delete the /snapshots and /backups subdirectories. where data_directory_location is Packaged installs: /var/lib/cassandra/data and Tarball installs: install_location/data/data
4. Locate the most recent snapshot folder in this directory:
data_directory_location/keyspace_name/table_name/snapshots/snapshot_name
5. Copy its contents into this directory: data_directory_location/keyspace_name/table_name directory.
6. If using incremental backups, copy all contents of this directory:
data_directory_location/keyspace_name/table_name/backups
7. Paste it into this directory: data_directory_location/keyspace_name/table_name