[SOLVED] Prune Job not doing its work

Dragao

New Member
Mar 28, 2025
21
3
3
Hi all,

I need some help with pruning

Screenshot 2025-12-02 081232.png

Above should keep like 18 backups (according to the simulator)

but reallity I have more.. still have a daily backup (with some VMs almost 30 now)

If I do a manually prune using the same settings the jobs will be removed
So I am kinda lost where my error is. :)

if more info is needed please let me know

Thnx in advanced
 
in addition.

It seems the prune job is doing it work for some vms. but definitely not all.

Also maybe good to know.
Job has been created on the pve (with no settings as the system adviced that it was best to do that on the pbs)
prune job is create a few week later.
 
Hi, did you check if the issue is that you only execute the prune job on saturday night? Your intention might be to execute this way more frequently.
 
Hi, did you check if the issue is that you only execute the prune job on saturday night? Your intention might be to execute this way more frequently.
No I did not but when I calculate all daily jobs before the 14th of November should be deleted (excluding 3 week backups) but I have daily backups till the 5th of November.

So my guess is it is not a problem with the schedule. Although I do get your point and I will change the prune schedule to daily. (But I do not think this will solve my problem)
 
So today I took another look at the prune log and It is just not doing its job..

Here is a snippet
2025-12-08T23:00:00+01:00: Starting datastore prune on datastore 'redacted-pbs-01-ds', root namespace, down to full depth
2025-12-08T23:00:00+01:00: retention options: --keep-hourly 24 --keep-daily 14 --keep-weekly 3 --keep-monthly 1 --keep-yearly 1
2025-12-08T23:00:00+01:00: Pruning group :"vm/8000"
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-05T20:03:28Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-06T20:05:24Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-07T20:00:45Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-08T20:00:42Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-09T20:00:35Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-10T20:12:53Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-11T20:02:28Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-12T20:21:35Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-13T20:51:22Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-14T20:11:39Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-15T20:11:11Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-16T20:11:24Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-17T20:24:49Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-18T20:15:13Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-19T20:12:20Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-20T20:47:38Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-21T20:24:37Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-22T20:21:29Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-23T20:12:37Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-24T20:28:27Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-25T20:13:53Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-26T20:29:01Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-27T20:21:35Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-28T20:18:12Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-29T20:26:58Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-11-30T20:17:33Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-01T20:41:01Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-02T20:34:11Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-03T20:15:17Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-04T20:21:59Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-05T20:30:12Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-06T20:25:53Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-07T20:14:37Z
2025-12-08T23:00:00+01:00: keep vm/8000/2025-12-08T20:21:45Z

so with these options: -keep-hourly 24 --keep-daily 14 --keep-weekly 3 --keep-monthly 1 --keep-yearly 1
I would expect to have all daily snapshots before the 22nd of November be deleted with the exception for Weekly backups (Sun 16-nov / Sun 09-nov)

As you can cleary see in the log no snapshots are removed.. What could be the cause?
 
Hmm I just tried a dryrun using the same retention and I might be confused with the hourly setting.

We have currently no hourly backup jobs. So My guess is now it will keep 24 backups (every day 1) as an hourly backup?
 
Ok so I am now using pruning without hourly saved. This seems to be working better :)