From e7ee06936a36f00ead21fcbdb93e055c0967b607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 17 Jul 2017 23:34:03 +0200 Subject: [PATCH] tools/qvm-backup-restore: handle VMs selection, not only exclusion QubesOS/qubes-issues#1214 --- qubesadmin/tools/qvm_backup_restore.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubesadmin/tools/qvm_backup_restore.py b/qubesadmin/tools/qvm_backup_restore.py index 85e40be..b240367 100644 --- a/qubesadmin/tools/qvm_backup_restore.py +++ b/qubesadmin/tools/qvm_backup_restore.py @@ -239,6 +239,11 @@ def main(args=None): except qubesadmin.exc.QubesException as e: parser.error_runtime(str(e)) + if args.vms: + backup.options.exclude += [vm for vm in restore_info + if vm not in args.vms] + restore_info = backup.restore_info_verify(restore_info) + print(backup.get_restore_summary(restore_info)) try: