all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 2/2] backup: log backup start via QMP command to avoid confusion about freeze/thaw
Date: Thu, 26 Mar 2026 12:31:42 +0100	[thread overview]
Message-ID: <20260326113251.68540-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260326113251.68540-1-f.ebner@proxmox.com>

Curently, a backup task log looks like:

> INFO: issuing guest-agent 'fs-freeze' command
> INFO: issuing guest-agent 'fs-thaw' command
> INFO: started backup task 'beebb719-bdb8-4de8-9d34-5cbf182cea3e'

or in case of a failure during backup start:

> INFO: issuing guest-agent 'fs-freeze' command
> INFO: issuing guest-agent 'fs-thaw' command
> ERROR: VM 100 qmp command 'backup' failed - <error message from QEMU>

Both might suggest that the thaw operation and starting the backup
happen in the wrong order, which can lead to confusion. Add a log line
when issuing the 'backup' QMP command to clarify that this is not the
case.

After the patch, the task logs look like:

> INFO: issuing guest-agent 'fs-freeze' command
> INFO: starting backup via QMP command
> INFO: issuing guest-agent 'fs-thaw' command
> INFO: started backup task 'e4e961c1-661b-4971-aefb-6715fd6a0d70'

or in case of a failure during backup start:

> INFO: issuing guest-agent 'fs-freeze' command
> INFO: starting backup via QMP command
> INFO: issuing guest-agent 'fs-thaw' command
> ERROR: VM 100 qmp command 'backup' failed - <error message from QEMU>

In case of provider-based backups, there already is a log-message
between freeze and thaw:

> INFO: issuing guest-agent 'fs-freeze' command
> INFO: setting up snapshot-access for backup
> INFO: issuing guest-agent 'fs-thaw' command

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/VZDump/QemuServer.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 2d55fbfa..cdf20219 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -841,6 +841,7 @@ sub archive_pbs {
 
         $params->{timeout} = 125; # give some time to connect to the backup server
 
+        $self->loginfo("starting backup via QMP command");
         my $res = eval { mon_cmd($vmid, "backup", %$params) };
         my $qmperr = $@;
         $backup_job_uuid = $res->{UUID} if $res;
@@ -1024,6 +1025,7 @@ sub archive_vma {
 
         my $fs_frozen = $self->qga_fs_freeze($task, $vmid);
 
+        $self->loginfo("starting backup via QMP command");
         eval { $qmpclient->queue_execute(30) };
         my $qmperr = $@;
 
-- 
2.47.3





      parent reply	other threads:[~2026-03-26 11:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 11:31 [PATCH-SERIES qemu-server 0/2] backup: improve logging upon backup start Fiona Ebner
2026-03-26 11:31 ` [PATCH qemu-server 1/2] backup: vma: add context to error message " Fiona Ebner
2026-03-26 11:31 ` Fiona 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=20260326113251.68540-3-f.ebner@proxmox.com \
    --to=f.ebner@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