Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If auto_snapshot is enabled in cassandra.yaml, when these snapshots will be deleted

If we set auto_snapshot: true in the cassandra.yaml, and we delete some table the snapshots for that particular table will be created right? So when will these snapshots be deleted? Do we need to delete them manually by running scripts? Or is there a setting which I can enable to auto-delete it after sometime?

like image 546
user6288321 Avatar asked Sep 15 '25 18:09

user6288321


1 Answers

so when these snapshots will be deleted?

Automatically? Never.

Do we need to delete them manually by running scripts?

Yes. This can be a long term problem, so it is a good idea to have a script running to handle this. In fact, the DataStax docs have a recommendation on this:

When taking a snapshot, previous snapshot files are not automatically deleted. You should remove old snapshots that are no longer needed.

The nodetool clearsnapshot command removes all existing snapshot files from the snapshot directory of each keyspace. You should make it part of your back-up process to clear old snapshots before taking a new one.

like image 52
Aaron Avatar answered Sep 18 '25 08:09

Aaron