Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upqvm-backup-restore does not allow restoring a single VM #2983
Comments
andrewdavidwong
added
bug
C: core
labels
Aug 6, 2017
andrewdavidwong
added this to the Release 4.0 milestone
Aug 6, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
blackpit73
Aug 9, 2017
can be tested easily as follows:
#-- test preparation
qvm-create -l yellow backuptest-1-vm
qvm-create -l yellow backuptest-2-vm
echo -n passphrase >test.passphrase
#-- create backup with backuptest-1-vm and backuptest-2-vm
qvm-backup --passphrase-file test.passphrase --yes pwd backuptest-1-vm backuptest-2-vm
#-- should only restore backuptest-1-vm, not backuptest-2-vm
qvm-backup-restore --rename-conflicting --passphrase-file test.passphrase qubes-2017-08-09T165253 backuptest-1-vm
-----------------+-------+-----------+-----------+--------+
name | type | template | netvm | label |
-----------------+-------+-----------+-----------+--------+
backuptest-2-vm | AppVM | fedora-25 | (default) | yellow | <-- Will be renamed to 'backuptest-2-vm1'
backuptest-1-vm | AppVM | fedora-25 | (default) | yellow | <-- Will be renamed to 'backuptest-1-vm1'
==> backuptest-2-vm will be restored as backuptest-2-vm1, although only backuptest-1-vm should be restored (at least from my expectation).
blackpit73
commented
Aug 9, 2017
|
can be tested easily as follows: #-- test preparation #-- create backup with backuptest-1-vm and backuptest-2-vm #-- should only restore backuptest-1-vm, not backuptest-2-vm -----------------+-------+-----------+-----------+--------+ ==> backuptest-2-vm will be restored as backuptest-2-vm1, although only backuptest-1-vm should be restored (at least from my expectation). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
blackpit73
Aug 9, 2017
The line https://github.com/QubesOS/qubes-core-admin-client/blob/master/qubesadmin/tools/qvm_backup_restore.py#L250 should be
corrected to using the original name ==> vm_info.vm.name for vm_info in restore_info.values(),
I'll commit a patch in my fork.
blackpit73
commented
Aug 9, 2017
|
The line https://github.com/QubesOS/qubes-core-admin-client/blob/master/qubesadmin/tools/qvm_backup_restore.py#L250 should be |
artemist commentedAug 6, 2017
Qubes OS version (e.g.,
R3.2):4.0-rc1
Expected behavior:
qvm-backup-restore -d <source> <file> vmnamerestores only the vm vmname, and makes no other changesActual behavior:
qvm-backup-restore -d <source> <file> vmnamerestores the vm vmname along with vms with a version which is also on the host. These new vms have the original name + '1' as the name.Steps to reproduce the behavior:
Install all VMs from a backup, then delete one and install it again.
General notes:
This seems to be since
restore_info.values()in this line of qvm_backup_restore.py returns the list of new names of the VMs, as opposed to the old ones. I fixed this when I needed to restore by usingvm.name.rstrip('1')instead ofvm.name, but this is not a long-term solution.