From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id C54D762FDF for ; Mon, 24 Aug 2020 09:26:24 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B063C1AAD1 for ; Mon, 24 Aug 2020 09:25:54 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 892D31AAC1 for ; Mon, 24 Aug 2020 09:25:53 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4FA6744837 for ; Mon, 24 Aug 2020 09:25:53 +0200 (CEST) To: Proxmox VE development discussion References: <20200709124547.2913-1-f.ebner@proxmox.com> <20200709124547.2913-8-f.ebner@proxmox.com> <7c174526-f527-3d52-89c0-4511c5c85385@proxmox.com> Cc: Thomas Lamprecht From: Fabian Ebner Message-ID: Date: Mon, 24 Aug 2020 09:25:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <7c174526-f527-3d52-89c0-4511c5c85385@proxmox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.668 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -1.381 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [vzdump.pm] Subject: Re: [pve-devel] [PATCH v4 manager 7/7] Always use prune-backups instead of maxfiles internally X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 07:26:24 -0000 Am 21.08.20 um 13:33 schrieb Thomas Lamprecht: > On 09.07.20 14:45, Fabian Ebner wrote: >> For the use case with '--dumpdir', it's not possible to call prune_backups >> directly, so a little bit of special handling is required there. >> >> Signed-off-by: Fabian Ebner >> --- >> PVE/VZDump.pm | 42 ++++++++++++++++-------------------------- >> 1 file changed, 16 insertions(+), 26 deletions(-) >> > > breaks having a max backup set on a storage, before this it complains, after > this I can make as many backups I want.. > Sorry, turns out it was a typo: Am 09.07.20 um 14:45 schrieb Fabian Ebner: > diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm > index 17153fe4..d87ef857 100644 > --- a/PVE/VZDump.pm > +++ b/PVE/VZDump.pm > @@ -484,8 +484,10 @@ sub new { > die "internal error"; > } > > - if (!defined($opts->{'prune-backups'}) && !defined($opts->{maxfiles})) { > - $opts->{maxfiles} = $defaults->{maxfiles}; > + if (!defined($opts->{'prune-backups'})) { > + $opts->{maxfiles} //= $defaults->{maxfiles}; > + $opts->{'prune_backups'} = { 'keep-last' => $opts->{maxfiles} }; With 'prune-backups' here, it should work. Should I send a v5? > + delete $opts->{maxfiles}; > }