Pruning doesn't work

docent

Renowned Member
Jul 23, 2009
96
1
73
Hello,
I don't understand how pruning is working.
Today is the first Monday in August, but as of 03/31/2024 the backup copy has not been deleted.
Why?
2024-08-05T00:00:00+05:00: prune job 'default-PVE01Backup-6c1d041d-a53'
2024-08-05T00:00:00+05:00: task triggered by schedule 'daily'
2024-08-05T00:00:00+05:00: Starting datastore prune on datastore 'PVE01Backup', root namespace, down to full depth
2024-08-05T00:00:00+05:00: retention options: --keep-last 7 --keep-daily 14 --keep-weekly 4 --keep-monthly 3
2024-08-05T00:00:00+05:00: Pruning group :"vm/100"
2024-08-05T00:00:00+05:00: keep vm/100/2024-03-31T16:00:00Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-04-28T17:00:00Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-05-26T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-06-16T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-06-23T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-06-30T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-07T17:00:03Z
2024-08-05T00:00:00+05:00: remove vm/100/2024-07-10T17:00:00Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-11T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-16T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-17T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-18T17:00:00Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-19T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-20T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-21T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-22T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-23T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-24T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-25T17:00:02Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-26T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-27T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-28T17:00:02Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-29T17:00:06Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-30T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-31T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-01T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-02T17:00:05Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-03T17:00:02Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-04T17:00:04Z
2024-08-05T00:00:00+05:00: TASK OK

Best regards,
Michael
 
see https://pbs.proxmox.com/docs/backup-client.html#backup-pruning and https://pbs.proxmox.com/docs/prune-simulator/index.html for details, but it does the right thing:

you specified keep-last 7 which are the following:
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-29T17:00:06Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-30T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-31T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-01T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-02T17:00:05Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-03T17:00:02Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-08-04T17:00:04Z

keep daily 14:

2024-08-05T00:00:00+05:00: keep vm/100/2024-07-11T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-16T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-17T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-18T17:00:00Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-19T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-20T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-21T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-22T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-23T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-24T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-25T17:00:02Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-26T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-27T17:00:01Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-28T17:00:02Z

then one is removed
2024-08-05T00:00:00+05:00: remove vm/100/2024-07-10T17:00:00Z

then keep weekly 4

2024-08-05T00:00:00+05:00: keep vm/100/2024-06-16T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-06-23T17:00:03Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-06-30T17:00:04Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-07-07T17:00:03Z

and then keep monthly 3

2024-08-05T00:00:00+05:00: keep vm/100/2024-03-31T16:00:00Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-04-28T17:00:00Z
2024-08-05T00:00:00+05:00: keep vm/100/2024-05-26T17:00:01Z

basically each 'keep-x' is a number slots to be filled, and it's not about the calendar days/months/etc.
 
  • Like
Reactions: UdoB
Thanks)
I thought all options were counted from the current time, like in Veeam B&R.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!