public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] live-restore: add more logging
@ 2021-05-18 15:13 Stefan Reiter
  2021-05-28 11:51 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Reiter @ 2021-05-18 15:13 UTC (permalink / raw)
  To: pve-devel

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 <s.reiter@proxmox.com>
---

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-28 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 15:13 [pve-devel] [PATCH qemu-server] live-restore: add more logging Stefan Reiter
2021-05-28 11:51 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal