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 3EAC571408 for ; Tue, 18 May 2021 17:14:25 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 29E3911A61 for ; Tue, 18 May 2021 17:13:55 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 6C72A11A55 for ; Tue, 18 May 2021 17:13:51 +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 175E5465F8 for ; Tue, 18 May 2021 17:13:51 +0200 (CEST) From: Stefan Reiter To: pve-devel@lists.proxmox.com Date: Tue, 18 May 2021 17:13:44 +0200 Message-Id: <20210518151344.11410-1-s.reiter@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.014 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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. [qemuserver.pm, proxmox.com] Subject: [pve-devel] [PATCH qemu-server] live-restore: add more logging 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: Tue, 18 May 2021 15:14:25 -0000 To bring it better in line with regular restore, also log the repository, the snapshot and the target for each drive. While at it, adjust capitalization of existing log line and clean up repeated '$1' use. Signed-off-by: Stefan Reiter --- As requested here: https://forum.proxmox.com/threads/backup-image-name-in-live-restore-task-log.89363/ PVE/QemuServer.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 638077c..773d060 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6416,17 +6416,23 @@ sub restore_proxmox_backup_archive { sub pbs_live_restore { my ($vmid, $conf, $storecfg, $restored_disks, $repo, $keyfile, $snap) = @_; - print "Starting VM for live-restore\n"; + print "starting VM for live-restore\n"; + print "repository: '$repo'\n"; + print "snapshot: '$snap'\n"; my $pbs_backing = {}; for my $ds (keys %$restored_disks) { $ds =~ m/^drive-(.*)$/; - $pbs_backing->{$1} = { + my $confname = $1; + $pbs_backing->{$confname} = { repository => $repo, snapshot => $snap, archive => "$ds.img.fidx", }; - $pbs_backing->{$1}->{keyfile} = $keyfile if -e $keyfile; + $pbs_backing->{$confname}->{keyfile} = $keyfile if -e $keyfile; + + my $drive = parse_drive($confname, $conf->{$confname}); + print "restoring '$ds' to '$drive->{file}'\n"; } my $drives_streamed = 0; -- 2.20.1