[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: snapshot strategy?

Hello Lou,

how do you clear the automatic ones (e.g. names unknown) without clearing the named ones?

The option '-t' might be what you are looking for: 'nodetool clearsnapshot -t nameOfMySnapshot'.

Le lun. 5 nov. 2018 à 13:38, Lou DeGenaro <lou.degenaro@xxxxxxxxx> a écrit :
The issue really is how to manage disk space.  It is certainly possible to take snapshots by name and delete them by name, perhaps one for each day of the week.  But how do you clear the automatic ones (e.g. names unknown) without clearing the named ones?



On Fri, Nov 2, 2018 at 12:28 PM Oleksandr Shulgin <oleksandr.shulgin@xxxxxxxxxx> wrote:
On Fri, Nov 2, 2018 at 5:15 PM Lou DeGenaro <lou.degenaro@xxxxxxxxx> wrote:
I'm looking to hear how others are coping with snapshots.

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.

But if you delete first, then there is a window of time when no snapshot exists until the new one is created.  And with a single snapshot there is no recovery further back than it.

You can also delete specific snapshot, by passing its name to the clearsnapshot command.  For example, you could use snapshot date as part of the name.  This will also prevent removing snapshots which were taken for reasons other than backup, like the automatic snapshot due to running TRUNCATE or DROP commands, or any other snapshots which might have been created manually by the operators.