]> git.proxmox.com Git - pve-storage.git/commit - test/prune_backups_test.pm
prune mark: correctly keep track of already included backups
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 14 Dec 2020 15:03:17 +0000 (15:03 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 14 Dec 2020 15:11:29 +0000 (16:11 +0100)
commit10dfeb9ef03b7e6fa1d7eac0fcf112a61eef1e2a
treea62cbcd37e379ad281a7f8fc3d554550e5b72a38
parent44fdfb2af6cbdb50abdb73af23ea92f5cdb0de1a
prune mark: correctly keep track of already included backups

This needs to happen in a separate loop, because some time intervals are not
subsets of others, i.e. weeks and months. Previously, with a daily backup
schedule, having:
* a backup on Sun, 06 Dec 2020 kept by keep-daily
* a backup on Sun, 29 Nov 2020 kept by keep-weekly
would lead to the backup on Mon, 30 Nov 2020 to be selected for keep-monthly,
because the iteration did not yet reach the backup on Sun, 29 Nov 2020 that
would mark November as being covered.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm
test/prune_backups_test.pm