user6288321
user6288321

Reputation: 365

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?

Upvotes: 4

Views: 3851

Answers (1)

Aaron
Aaron

Reputation: 57758

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.

Upvotes: 6

Related Questions