ossobv / planb

PlanB - automating remote backups and snapshots with zfs/rsync
GNU General Public License v3.0
28 stars 3 forks source link

When cleaning up old monthlies, keep 'm by count, not by date #16

Closed wdoekes closed 4 years ago

wdoekes commented 6 years ago

Just now, I restarted a backup and amazingly, all old snapshots were pruned immediately, leaving me with only todays backup.

It should've kept 3 monthlies, because it's set to 3. Not purge every old one just because they're older than three months old.

wdoekes commented 4 years ago

@Urth : can you describe what happens in this scenario now?

Will it keep 5 months old snaps, but drop 7 month old ones? Because 5 is closer to 3?

Urth commented 4 years ago

Snapshots are still kept by date, relative to the latest snapshot, rather than count. Backups older than the retention count relative to the latest snapshot will be destroyed!