all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Jonas Theisen <j.theisen@proxmox.com>
To: Jakob Klocker <j.klocker@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH pve-manager v2 2/4] fix #6464: vzdump: add retry strategies for failed guest backups
Date: Wed, 11 Nov 2026 16:40:52 +0100	[thread overview]
Message-ID: <fbe9e088-4fb8-4fc2-a24d-560138268e2a@proxmox.com> (raw)
In-Reply-To: <20261111093407.109872-3-j.klocker@proxmox.com>

On 11/11/26 10:35, Jakob Klocker wrote:
> <snip>
>
> diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
> index 56d2aea3..e4aa303d 100644
> --- a/PVE/VZDump.pm
> +++ b/PVE/VZDump.pm
> @@ -10,6 +10,7 @@ use File::Path;
>   use IO::File;
>   use IO::Select;
>   use IPC::Open3;
> +use List::Util qw(min);
>   use POSIX qw(strftime);
>   use Time::Local;
>   
> @@ -1048,7 +1049,8 @@ sub exec_backup_task {
>           -d $task->{tmpdir}
>               || die "unable to create temporary directory '$task->{tmpdir}'";
>   
> -        $logfd = IO::File->new(">$tmplog")
> +        my $logmode = $task->{retries} ? '>>' : '>';
> +        $logfd = IO::File->new("${logmode}${tmplog}")

In case the first backup run fails before opening its backup log
the retry's log gets appended to an older previous log file.
Maybe cleanup the $tmplog once per job to avoid appending
to a remaining log file?
>               || die "unable to create log file '$tmplog'";
>   
>           $task->{dumpdir} = $opts->{dumpdir};
>
> <snip>





  reply	other threads:[~2026-11-11 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  9:34 [PATCH docs/guest-common/manager v2 0/4] fix #6464: backup: add backup retry strategies Jakob Klocker
2026-11-11  9:34 ` [PATCH pve-guest-common v2 1/4] vzdump: add error-behavior and max-retries options Jakob Klocker
2026-11-11  9:34 ` [PATCH pve-manager v2 2/4] fix #6464: vzdump: add retry strategies for failed guest backups Jakob Klocker
2026-11-11 15:40   ` Jonas Theisen [this message]
2026-11-11  9:34 ` [PATCH pve-manager v2 3/4] ui: backup: add error behavior and retry options Jakob Klocker
2026-11-11 15:40   ` Jonas Theisen
2026-11-11  9:34 ` [PATCH pve-docs v2 4/4] vzdump: document backup " Jakob Klocker
2026-11-11 15:40 ` [PATCH docs/guest-common/manager v2 0/4] fix #6464: backup: add backup retry strategies Jonas Theisen

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=fbe9e088-4fb8-4fc2-a24d-560138268e2a@proxmox.com \
    --to=j.theisen@proxmox.com \
    --cc=j.klocker@proxmox.com \
    --cc=pve-devel@lists.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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal