zfs_autobackup icon indicating copy to clipboard operation
zfs_autobackup copied to clipboard

--no-snapshot --keep-source=0 does not delete all snapshots

Open fhriley opened this issue 5 years ago • 8 comments

Those options tell zfs-autobackup to not create a snapshot and keep 0 snapshots, but zfs-autobackup is hardcoded to keep the last snapshot. zfs-autobackup should not override what I asked it to do.

fhriley avatar Aug 27 '20 00:08 fhriley

True, this was originally to prevent people "shooting them self in the foot" and accidentally deleting the common snapshot.

However in snapshot-mode this makes sense i guess. And even if you want to do a one-time synchronization and delete the source snapshot after its complete?

Will fix this.

A --keep-target=0 doesn't make sense, right? :)

psy0rz avatar Aug 27 '20 10:08 psy0rz

hmm.. i realise that keep-target=0 also is usefull for onetime replication .

psy0rz avatar Feb 02 '21 20:02 psy0rz

I've made some preparations for this.

It will be called --keep-source=cleanup and --keep-target=cleanup, to indicate we really want a cleanup. E.g.: delete all snapshots belonging to this backup and breaking the backup.

Specifying 0 will become an error and inform the user of the cleanup if he really wants that.

psy0rz avatar Feb 02 '21 22:02 psy0rz