[pve-devel] [PATCH storage 3/6] Introduce prune-backups property for directory-based storages
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Jul 7 08:49:52 CEST 2020
On July 7, 2020 8:43 am, Thomas Lamprecht wrote:
> On 07.07.20 08:36, Fabian Grünbichler wrote:
>> On June 4, 2020 11:08 am, Fabian Ebner wrote:
>>> @@ -43,6 +43,54 @@ cfs_register_file ('storage.cfg',
>>> sub { __PACKAGE__->parse_config(@_); },
>>> sub { __PACKAGE__->write_config(@_); });
>>>
>>> +my %prune_option = (
>>> + optional => 1,
>>> + type => 'number', minimum => '1',
>>
>> shouldn't this be type 'integer'?
>>
>> I am not sure whether minimum '1' is a good choice - what if I want to
>> explicitly disable a certain keep-* option instead of just keeping it
>> blank? also see next patch..
>
> mirrors the exact PBS behavior, you do not have to sent it but once you do
> it has to be >= 1 - makes sense for such an option, what would setting week
> to 0 mean?
keep-last=5,keep-hourly=0,keep-daily=7,keep-weekly=4,keep-monthly=12,keep-yearly=10
just reads clearer IMHO than having to drop keep-hourly entirely, but
semantics wise it would be the same ;) I can live with either though.
> integer makes sense to me, though.
More information about the pve-devel
mailing list