From 836465ba5b2b5690d05b2b2e0c41c81ab51dab22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maja=20K=C4=85dzio=C5=82ka?= Date: Sat, 10 Dec 2022 15:13:45 +0100 Subject: [PATCH] qvm-backup-restore --verify-only: don't overwrite VM properties --- qubesadmin/backup/restore.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qubesadmin/backup/restore.py b/qubesadmin/backup/restore.py index 93f25dd7..6e64dc1f 100644 --- a/qubesadmin/backup/restore.py +++ b/qubesadmin/backup/restore.py @@ -2042,13 +2042,17 @@ def _restore_vms_metadata(self, restore_info): continue # restore this property early to be ready for dependent DispVMs - prop = 'template_for_dispvms' - value = vm.properties.get(prop, None) - if value is not None: - self._restore_property(new_vm, prop, value) + if not self.options.verify_only: + prop = 'template_for_dispvms' + value = vm.properties.get(prop, None) + if value is not None: + self._restore_property(new_vm, prop, value) restore_info[vm.name].restored_vm = new_vm + if self.options.verify_only: + return + for vm in vms.values(): if self.canceled: return