Prune extra keep settings apparently not recognised?

I’ve added extra periods to my prune job; and the log appears to list the command correctly; however, a little lower in the job log it only lists two of them. I don’t know if the rest are being ignored or not, as I don’t have enough versions yet; but it bothers me :stuck_out_tongue:

Log excerpt:

Options: [-log prune -storage storagename -keep 0:3650 -keep 7:7 -keep 1:1 -a -keep 30:30 -keep 365:365 -threads 8]
2019-08-01 12:31:37.656 INFO STORAGE_SET Storage set to b2://bucketname
2019-08-01 12:31:40.399 INFO RETENTION_POLICY Keep no snapshots older than 3650 days
2019-08-01 12:31:40.399 INFO RETENTION_POLICY Keep 1 snapshot every 7 day(s) if older than 7 day(s)
2019-08-01 12:31:40.399 INFO RETENTION_POLICY Keep 1 snapshot every 1 day(s) if older than 1 day(s)
2019-08-01 12:31:47.975 INFO FOSSIL_COLLECT Fossil collection 10 found
[...]

The intent is to keep one hourly for 24 hours; one daily for a week; one weekly for a month, one monthly for a year and one yearly for ten years. It doesn’t seem to pick up on the 30:30 and 365:365; and they are also the ones that appear out of reverse sorting order in the commandline… might that be the cause?

Update: Yep. I changed the parameter order in the job, and now it works as expected:

2019-08-01 15:53:48.177 INFO RETENTION_POLICY Keep no snapshots older than 3650 days
2019-08-01 15:53:48.177 INFO RETENTION_POLICY Keep 1 snapshot every 365 day(s) if older than 365 day(s)
2019-08-01 15:53:48.177 INFO RETENTION_POLICY Keep 1 snapshot every 30 day(s) if older than 30 day(s)
2019-08-01 15:53:48.177 INFO RETENTION_POLICY Keep 1 snapshot every 7 day(s) if older than 7 day(s)
2019-08-01 15:53:48.177 INFO RETENTION_POLICY Keep 1 snapshot every 1 day(s) if older than 1 day(s)

I consider this a bug: the initial dialog has interface options for the first two that were set, but the rest had to be added as commandline options. I would suggest two changes to fix this cleanly:

  • a + button in the initial setup dialog for purge jobs to add more keep selection lines; as well as
  • automatically sorting all keep parameters on invocation of the purge command.
1 Like

Yes. Take a look:

1 Like

Ah, I didn’t see that.

Still, I believe that makes it a bug that the setup dialog for prune jobs doesn’t automatically sort them when creating the job.