From the documentation.
Take snapshot
Snapshots are taken as node using the nodetool snapshot command. To take a global snapshot, run the nodetool snapshot command using a parallel ssh utility, such as pssh.
The snapshot first flushes all the records in the memory to disk, and then makes a hard link of the SSTable files for each key space. You should have enough free disk space for the node to host snapshots of your date files. One snapshot requires a small amount of disk space. However, snapshots can cause your disk to grow rapidly over time because the snapshot prevents older obsolete data files from being deleted. After the snapshot is completed, you can move the backup files to another location if necessary, or you can leave them in place.
Run the nodetool snapshot command with the host name, JMX port, and key space.
$ nodetool -h localhost -p 7199 snapshot mykeyspace
A snapshot is created in the data_directory_location/keyspace_name/table_name/snapshots/snapshot_name directory. Each snapshot directory contains many .db files that contain data during the snapshot.
Cassandra takes a node before taking a snapshot, takes snapshots and saves the data in the snapshot directory of each keypace in the data directory. If you do not specify a snapshot directory name using the -t option, Cassandra names the directory using a snapshot timestamp, for example 1391460334889. Follow the procedure for a snapshot before updating Cassandra. when updated, back up all key areas. For more information on snapshots, see the Apache Documentation .
If you did not provide a snapshot name, Cassandra writes snapshot directories using the snapshot timestamp . If there is no data in the key space, empty directories are not created.
Example: snapshot of one table
Take a snapshot of only the playlist tables in the music key space. On Linux, in the Cassandra bin directory, for example:
$ ./nodetool snapshot -cf playlists music Requested creating snapshot(s) for [music] with snapshot name [1391461910600] Snapshot directory: 1391461910600
Cassandra creates a snapshot directory named 1391461910600 that contains the backup data of the playlist table in
/var/lib/cassandra/data/music/playlists-bf8118508cfd11e3972273ded3cb6170/snapshots nodetool <options> snapshot ( ( -cf <table> | --column-family <table> ) ( -t <tag> | --tag <tag> ) -- ( <keyspace> ) | ( <keyspace> ... ) )
:
( -h | --host ) |
- (
-p | --port ) - (
-pw | --password ) ( -u | --username )
-cf or --column-family followed by the name of the table to back up.
-t or --tag followed by the name of the snapshot.
- Separates a parameter and an argument that may be mistaken for a parameter.
keyspace is the one key name that is required when using the -cf option or one or more additional key names separated by a space.
UPDATE ::
/var/lib/cassandra/data/music/playlists-bf8118508cfd11e3972273ded3cb6170/snapshots
Here in playlists-bf8118508cfd11e3972273ded3cb6170 , - bf8118508cfd11e3972273ded3cb6170 UUID
Thus, it is generated in this way. Ad There are some options for monitoring recorded sstables and phased backup of these files.
Check out tablesnap and cassandra snapshotter .