From: Fabian Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [pve-devel] [PATCH v4 manager 7/7] Always use prune-backups instead of maxfiles internally
Date: Mon, 24 Aug 2020 09:25:48 +0200 [thread overview]
Message-ID: <c24a4261-a994-7722-88d7-859b4a999128@proxmox.com> (raw)
In-Reply-To: <7c174526-f527-3d52-89c0-4511c5c85385@proxmox.com>
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 <f.ebner@proxmox.com>
>> ---
>> 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};
> }
prev parent reply other threads:[~2020-08-24 7:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 12:45 [pve-devel] [PATCH-SERIES v4] fix #2649: introduce prune-backups property for storages supporting backups Fabian Ebner
2020-07-09 12:45 ` [pve-devel] [PATCH v4 storage 1/7] Introduce prune-backups property for directory-based storages Fabian Ebner
2020-07-24 17:07 ` [pve-devel] applied: " Thomas Lamprecht
2020-07-09 12:45 ` [pve-devel] [PATCH v4 storage 2/7] Add prune_backups to storage API Fabian Ebner
2020-07-24 17:07 ` [pve-devel] applied: " Thomas Lamprecht
2020-07-09 12:45 ` [pve-devel] [PATCH v4 storage 3/7] Add API and pvesm call for prune_backups Fabian Ebner
2020-07-13 7:04 ` Fabian Ebner
2020-07-24 17:08 ` Thomas Lamprecht
2020-07-09 12:45 ` [pve-devel] [PATCH v4 guest-common 4/7] Add prune-backups option to vzdump parameters Fabian Ebner
2020-08-20 15:39 ` [pve-devel] applied: " Thomas Lamprecht
2020-07-09 12:45 ` [pve-devel] [PATCH v4 manager 5/7] make use of archive_info and archive_remove Fabian Ebner
2020-08-21 11:31 ` [pve-devel] applied: " Thomas Lamprecht
2020-07-09 12:45 ` [pve-devel] [PATCH v4 manager 6/7] Allow prune-backups as an alternative to maxfiles Fabian Ebner
2020-07-09 12:45 ` [pve-devel] [PATCH v4 manager 7/7] Always use prune-backups instead of maxfiles internally Fabian Ebner
2020-08-21 11:33 ` Thomas Lamprecht
2020-08-24 7:25 ` Fabian Ebner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c24a4261-a994-7722-88d7-859b4a999128@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.