Select storage pools when restoring backup

21 views
Skip to first unread message

donoban

unread,
Apr 3, 2019, 9:24:57 AM4/3/19
to qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I would like to switch a 512GB hard disk with a new 2TB and I think I
will do a full reinstall with a backup restore.

For this purpose, it would be nice to have some method for specify
where restore each qube. Currently qvm-backup-restore says:

usage: qvm-backup-restore [--verbose] [--quiet] [--help] [--verify-only]
[--skip-broken] [--ignore-missing]
[--skip-conflicting] [--rename-conflicting]
[-x EXCLUDE] [--skip-dom0-home]
[--ignore-username-mismatch]
[--ignore-size-limit]
[-d APPVM] [-p PASS_FILE]
backup_location [vms [vms ...]]

So I assume that currently there is no way for configure this. I would
like to do something like this:
backup_location [vms[:pool] [vms[:pool] ...]]

And to use default pool if [:pool] is omitted. The idea is to restore
all VM's in different pools with the same command and also port the
functionally to GUI/Qube Manager.

I did some research in current code and I found 'override_pool' in
'qubesadmin.backup.restore.py', but I can not determine if it is being
used in practice.

Any ideas about this?

Regards.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEznLCgPSfWTT+LPrmFBMQ2OPtCKUFAlyktBIACgkQFBMQ2OPt
CKWBuQ//X5+P5G+Nf24tWAFYSFIpZyeyOtO4O3c/BK7+0v5rrGTodsJR/oH700P6
AMRsOMa+14EdqyjTFTd3sO7H8FiDWMEFSdDQ1R2gMyx8G/z62N5idraDTrJxA4EO
SwqrKJ5nqtdzAKHRpuJLb38vhGc2rDJmrQEfhTPk1umhKjQZpEWnNhd6yBKdXebh
KuZWVCXbgNfnago+Qrgwt/1arMjo8/NMXEpCg41xQVYT07JiRYp6L0MOhe12G8Py
AXQIW7g1K2Cus9pPyIXG5nSvyUs7dr+GtSRmo3wiD8AYclo3JCUCk35hrU2dAfzw
5GWczPQ+X0vFv4mlj+/YqViPkuEnTQy4RDj8ZLgZfpsChomagU5kkuq79k6I3tJQ
JSrITpZGw5Yj1FmIeszuAdMJ0RXb5Ukxn5HkYvV02FHVlJilDL3h68fjpTOHMFvh
JciWzAY1KtK14HLruXGnJpehZ2/PfEgJrN4Bw31e/CfFABQmxGrZ+LMZdb641YlS
SImlXcdaWMTE3M7oKRcpun4I4rrdDc8uPrQ5buv9cA8rdPvB90YlKa7lNySnBJeY
OvXwN++E3MCKoNFnyfc2iW9/E5Mhsrv3eKNHaChXNvOsaxlBNK3b9qOTlo8zW8Tu
0vqTYgGos4dTGcpL3k2C5Jjc+c77OKld7OqoksKVBsViJwD/GzY=
=TYAX
-----END PGP SIGNATURE-----

Marek Marczykowski-Górecki

unread,
Apr 3, 2019, 10:16:01 AM4/3/19
to donoban, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wed, Apr 03, 2019 at 03:24:39PM +0200, donoban wrote:
> Hi,
>
> I would like to switch a 512GB hard disk with a new 2TB and I think I
> will do a full reinstall with a backup restore.
>
> For this purpose, it would be nice to have some method for specify
> where restore each qube. Currently qvm-backup-restore says:
>
> usage: qvm-backup-restore [--verbose] [--quiet] [--help] [--verify-only]
> [--skip-broken] [--ignore-missing]
> [--skip-conflicting] [--rename-conflicting]
> [-x EXCLUDE] [--skip-dom0-home]
> [--ignore-username-mismatch]
> [--ignore-size-limit]
> [-d APPVM] [-p PASS_FILE]
> backup_location [vms [vms ...]]
>
> So I assume that currently there is no way for configure this.

You're correct. Right now the only way to restore to a specific pool is
to switch the default before restoring. But you can do that multiple
times, for example:

1. qubes-prefs default_pool pool1
2. qvm-backup-restore ... vm1 vm2 vm3
3. qubes-prefs default_pool pool2
4. qvm-backup-restore ... vm4 vm5 vm6

This way vm1-3 will go into pool1 and vm4-6 into pool2. It will take
some more time (the backup will be extracted twice), but you don't do
that so often...

> I would
> like to do something like this:
> backup_location [vms[:pool] [vms[:pool] ...]]
>
> And to use default pool if [:pool] is omitted. The idea is to restore
> all VM's in different pools with the same command and also port the
> functionally to GUI/Qube Manager.
>
> I did some research in current code and I found 'override_pool' in
> 'qubesadmin.backup.restore.py', but I can not determine if it is being
> used in practice.

No, it isn't. But also it isn't much different from changing the default, as it
select storage for all the VMs, not individual ones.

> Any ideas about this?

To be honest, I don't think restoring different VMs into different pools
is that common case to spend much time on it (you can do that already
using the procedure above). But if you'd like to work on this anyway,
IMO it would make sense to have separate qvm-backup-restore options for
default pool for templates and other VMs, instead of per-VM control.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAlykwBgACgkQ24/THMrX
1yzHqQf+OJtt8oq1n9hiq1c6HUqWxh2+cYAhc//2XzFWWGk2Iz9xrKEZe0znx3ig
SfMNuULTSp3ltLbjWAb+r2VNQbpvkF+hsiHRdOENoNj03W38dLlEXZkh/Rbw4SgL
7yrgcAStzv8yIq70pfa1mV05+VLLMlrsMUW+XY6fFUjhwlScnRkFSz+dF9HBzq4O
dtLWFKFIndee8QS29tSaM5xDV/zGydYO3xQkQX0HjODIOOPH8Z1KjaYk2AYMODjj
93quJJcIrqMOGUGmmGwjCjjBFKFcxX30402d6BuAHt9sWPNKxVJcwvpLfSZuIf+k
HoeHNcDpKeaNBzO0XeJsl/FUCcwuNA==
=2xCL
-----END PGP SIGNATURE-----

donoban

unread,
Apr 3, 2019, 12:20:14 PM4/3/19
to qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 4/3/19 4:15 PM, Marek Marczykowski-Górecki wrote:> You're correct.
Right now the only way to restore to a specific pool is
> to switch the default before restoring. But you can do that
> multiple times, for example:
>
> 1. qubes-prefs default_pool pool1 2. qvm-backup-restore ... vm1 vm2
> vm3 3. qubes-prefs default_pool pool2 4. qvm-backup-restore ... vm4
> vm5 vm6
>
> This way vm1-3 will go into pool1 and vm4-6 into pool2. It will
> take some more time (the backup will be extracted twice), but you
> don't do that so often...

I could avoid the double extraction doing two separates backups for
each pool.

>
> To be honest, I don't think restoring different VMs into different
> pools is that common case to spend much time on it (you can do that
> already using the procedure above). But if you'd like to work on
> this anyway, IMO it would make sense to have separate
> qvm-backup-restore options for default pool for templates and other
> VMs, instead of per-VM control.
>
>

Yes probably there are other better things for do. Really I just
wanted to avoid restoring on a pool and then move to another so I will
just do two different backups and change default before restoring.

Thanks Marek.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEznLCgPSfWTT+LPrmFBMQ2OPtCKUFAlyk3TYACgkQFBMQ2OPt
CKUEkxAAqIsTauWeDn8Wc4yieSG0EmWea/xycRoOPVf9LJRNBIVsrvUFVYmQ7oa2
RHAkZsBkbujXP42CCVMaiUzGEtBUYDDaFEGzODCgUyHLFuTLxSroagHrleHpYaGS
kjR+8a4Svc+6nI31MGrvaTqgod+uHogKa0qKWFKfYPnX18JspvSAZzw+HHHrOvGQ
//0YYeGXiwaNv4IyyfCWW18UVtYIA8hvxOT8BTnkEj185mE+RufDNiEKOFLzdp3i
iS0/LRjjOJw661LxGUPowGGM+N05p/aK9aLj0ceRkbir9tZ8peulmnOM8a5WTg5D
6sxOWffSe8aTWvUraAkYE+Q1vrBr/GHmEKjiya8zklFpMS0MuCwPJDE3nRALc/Aw
rz68azfLR5x4/ayPhsEAigF3m/glzzlgn+kcog9R/f3XoPFcgj4lOtwAJL2T1Fvx
Lc0aVGgNNfSb4aqPRkbpeWcolfaBVPjug4AQ4s9DHSLy+DpraDg7V3euIEbKm4Ad
6bFgKjerPDcR6cjK6uC9T+m+UigqwkFQG+KNBvfcBYJYdzYBetsxxHSARyQDZ5Jq
+P+M8+JJTB2bd2rnm5gTBCRm2RVT0jzpKedmFzi1vTXI0K+VuVMCr0x0qfCCLZhf
nHDWb0aYM4E5u+QHOB/V27GsHPjuM8Ll427iPPmzfQnjnxwUE6M=
=YSlW
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages