Why are snapshots not pruned?

ocroquette

New Member
Feb 20, 2024
12
1
3
Hello everyone,

I am a new user and I cannot find out why my snapshots are not pruned. Here is a log that shows the issue. I do not understand why all snapshots of vm/100 between "vm/100/2024-01-24T21:00:01Z" and "vm/100/2024-02-06T11:00:03Z" are kept, for instance. They are out of the "daily" scope. Only one should be kept for weekly scope.
The backups are performed from a remote PVE, if it makes any difference.

Code:
Proxmox
Backup Server 3.1-2
2024-02-20T11:09:29+02:00: prune job 'default-pve1-8085bc65-8314-4532-'
2024-02-20T11:09:29+02:00: Starting datastore prune on datastore 'pve1', root namespace, down to full depth
2024-02-20T11:09:29+02:00: retention options: --keep-hourly 24 --keep-daily 14 --keep-weekly 4 --keep-monthly 12
2024-02-20T11:09:29+02:00: Pruning group :"vm/103"
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-24T21:00:17Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-25T21:00:21Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-26T21:00:17Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-27T21:00:14Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-28T21:00:23Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-29T21:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-30T21:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-01-31T21:00:12Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-01T21:00:17Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-02T21:00:15Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-03T21:00:15Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-04T21:00:21Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-05T21:00:17Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-06T11:00:18Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-06T13:00:22Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-06T15:00:30Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-06T17:00:19Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-06T19:00:18Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-06T21:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-06T23:00:20Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-07T01:00:14Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-07T03:00:13Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-07T05:00:13Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-07T07:00:17Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-07T09:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-07T11:00:14Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-07T13:00:18Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-08T02:00:15Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-08T10:55:29Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-13T02:00:32Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-14T02:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-15T02:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-16T02:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-17T02:00:32Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-18T02:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-19T02:00:16Z
2024-02-20T11:09:29+02:00: keep vm/103/2024-02-20T02:00:18Z
2024-02-20T11:09:29+02:00: Pruning group :"vm/100"
2024-02-20T11:09:29+02:00: keep vm/100/2024-01-24T21:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-01-26T21:00:04Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-01-27T21:00:02Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-01-28T21:00:07Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-01-29T21:00:00Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-01-30T21:00:03Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-01-31T21:00:00Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-01T21:00:02Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-02T21:00:00Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-03T21:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-04T21:00:06Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-05T21:00:02Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-06T11:00:03Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-06T13:00:04Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-06T15:00:04Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-06T17:00:04Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-06T19:00:04Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-06T21:00:04Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-06T23:00:05Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-07T01:00:00Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-07T03:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-07T05:00:00Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-07T07:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-07T09:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-07T11:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-07T13:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-08T02:00:00Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-08T10:55:15Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-13T02:00:04Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-14T02:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-15T02:00:02Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-16T02:00:01Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-17T02:00:00Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-18T02:00:03Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-19T02:00:02Z
2024-02-20T11:09:29+02:00: keep vm/100/2024-02-20T02:00:02Z
2024-02-20T11:09:29+02:00: Pruning group :"vm/102"
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-24T21:00:12Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-25T21:00:12Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-26T21:00:12Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-27T21:00:08Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-28T21:00:18Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-29T21:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-30T21:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-01-31T21:00:08Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-01T21:00:12Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-02T21:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-03T21:00:10Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-04T21:00:16Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-05T21:00:12Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-06T11:00:13Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-06T13:00:16Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-06T15:00:15Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-06T17:00:14Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-06T19:00:13Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-06T21:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-06T23:00:15Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-07T01:00:09Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-07T03:00:07Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-07T05:00:08Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-07T07:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-07T09:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-07T11:00:09Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-07T13:00:13Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-08T02:00:10Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-08T10:55:24Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-13T02:00:23Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-14T02:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-15T02:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-16T02:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-17T02:00:27Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-18T02:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-19T02:00:11Z
2024-02-20T11:09:29+02:00: keep vm/102/2024-02-20T02:00:13Z
2024-02-20T11:09:29+02:00: Pruning group :"vm/101"
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-24T21:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-25T21:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-26T21:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-27T21:00:04Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-28T21:00:13Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-29T21:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-30T21:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-01-31T21:00:02Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-01T21:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-02T21:00:05Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-03T21:00:05Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-04T21:00:12Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-05T21:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-06T11:00:08Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-06T13:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-06T15:00:10Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-06T17:00:09Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-06T19:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-06T21:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-06T23:00:10Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-07T01:00:04Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-07T03:00:02Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-07T05:00:03Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-07T07:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-07T09:00:05Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-07T11:00:04Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-07T13:00:08Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-08T02:00:04Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-08T10:55:19Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-13T02:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-14T02:00:05Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-15T02:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-16T02:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-17T02:00:07Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-18T02:00:06Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-19T02:00:05Z
2024-02-20T11:09:29+02:00: keep vm/101/2024-02-20T02:00:08Z
2024-02-20T11:09:29+02:00: TASK OK

Thanks for your help!
 
Hi,
keep-hourly 24 means "keep backups for 24 different hours". The next setting is then applied for backups that have not yet been considered by the keep-hourly setting. Then, keep-daily 14 means "keep backups for 14 different days". See https://pbs.proxmox.com/docs/prune-simulator/index.html for an explanation and to experiment with different settings.
 
Ah, now I get it, thank you. I did not realize that changing the settings of the "short" options push back the effect of the "longer" options. This means also that the periodicity of the snapshots has a big impact on the retention. More specifically, if the snapshot period is significantly longer than the prune intervals, things get weird. For instance, daily snapshots combined with --keep-hourly H --keep-daily D make it behave like --keep-daily (H+D).
I am more familiar with BorgBackup, which has a different interpretation, I believe, but I would have to double-check.
 

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!