Search code examples
cassandradatastax-enterprise

Deleting specific Cassandra snapshots


I know that there is a command,

nodetool -h localhost -p 7199 clearsnapshot

That will delete ALL snapshots, however I only want to delete specific ones - had some trouble getting a node to be able to take snapshots due to misconfigured permissions, while troubleshooting I generated multiple snapshots today that I want to delete while keeping the others.

Can I just go into the individual snapshots directories for each node and manually delete the snapshots I want to get rid of?


Solution

  • You can delete individual snapshots manually or use the -t option like this:

    "nodetool clearsnapshot -t snapshot_name".

    The name is the epoch time when the snapshot was taken.

    All the clearsnapshot command does is a recursive delete of the specified snapshots in the "snapshots" directories.

    See:

    deleting snapshots