backup

88 views
Skip to first unread message

Gabriel

unread,
Sep 27, 2016, 9:59:13 AM9/27/16
to qubes...@googlegroups.com
Hi fellows,

I started using qubes a while ago and I have a question concerning backups.
What I want is a complete backup to a dedicated external USB HDD. I understand to achieve this all the VMs must be shut down.
Therefore when I plugged in the HDD I mounted it in dom0 under /mnt.

Questions:
1. When I ran Qubes VM Manager -> Backup VMs, I received an error message stating no place on device and a zero byte backup file. Permissions are OK, there's more than enough space on the HDD.
Any reasons why the backup did not succeed?

2. I tried running qvm-backup from the command line, which ran fine, no permission problems on the same HDD. However, the template VMs are not included by default and I saw no command-line option to automatically achieve this. Am I missing something here?

3. I know I can manually list all the VMs on the command line to be backed up, but I find that a bit awkward, so I tried this:
qvm-ls --raw-list | xargs qvm-backup /mnt/test/

but this threw a Python exception...

For now I resorted to typing all the VMs by hand ... not elegant.

Any help is appreciated.

Best,
Gabe


Sent with ProtonMail Secure Email.

Jeremy Rand

unread,
Sep 27, 2016, 10:27:13 AM9/27/16
to qubes...@googlegroups.com
'Gabriel' via qubes-users:
> Hi fellows,
>
> I started using qubes a while ago and I have a question concerning backups.
> What I want is a complete backup to a dedicated external USB HDD. I understand to achieve this all the VMs must be shut down.
> Therefore when I plugged in the HDD I mounted it in dom0 under /mnt.

You can backup a subset of VM's from the GUI. I typically backup every
VM except the USB VM (with the external HDD attached to the USB VM and
mounted in a DispVM), under the assumption that if I'm ever restoring to
a fresh Qubes install, there will already be a USB VM there, so backing
up the USB VM isn't really needed.

Cheers,
-Jeremy

signature.asc

Andrew David Wong

unread,
Sep 27, 2016, 1:57:04 PM9/27/16
to Gabriel, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2016-09-27 06:59, 'Gabriel' via qubes-users wrote:
> Hi fellows,
>
> I started using qubes a while ago and I have a question concerning backups.
> What I want is a complete backup to a dedicated external USB HDD. I understand to achieve this all the VMs must be shut down.
> Therefore when I plugged in the HDD I mounted it in dom0 under /mnt.
>

This is fine as long as you trust the USB device you're attaching to dom0. If you don't, consider using a USB qube instead:

https://www.qubes-os.org/doc/usb/#creating-and-using-a-usb-qube

> Questions:
> 1. When I ran Qubes VM Manager -> Backup VMs, I received an error message stating no place on device and a zero byte backup file. Permissions are OK, there's more than enough space on the HDD.
> Any reasons why the backup did not succeed?
>

Are you sure you selected the correct device in the menu?

> 2. I tried running qvm-backup from the command line, which ran fine, no permission problems on the same HDD. However, the template VMs are not included by default and I saw no command-line option to automatically achieve this. Am I missing something here?
>

The RPM-managed TemplateVMs should normally not be backed up. Instead, you should clone them (if you can spare the drive space), make your customizations, then back up the clones.

> 3. I know I can manually list all the VMs on the command line to be backed up, but I find that a bit awkward, so I tried this:
> qvm-ls --raw-list | xargs qvm-backup /mnt/test/
>
> but this threw a Python exception...
>
> For now I resorted to typing all the VMs by hand ... not elegant.
>
> Any help is appreciated.
>

Try this:

$ qvm-backup /mnt/test/ `qvm-ls --raw-list`

You can also prepare a list of VMs (one VM name per line) as a file, then:

$ qvm-backup /mnt/test/ `cat vm_list.txt`

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJX6rLjAAoJENtN07w5UDAwuJQQAMu+Wfr56Bmf6bmJVCrZWY76
ZosTo+0ouB7jBYcoplACyirVmXjhFK3G9AFKRnpNZ3qo7m9w3rWD6cgbYwv88yfW
nTJZBV88xqQqLGjqz3+OCi84/sfpOgIC8tXhzZndKcGb+5yd0FxRgZhZg4shdJ4d
DoBX2hAfwzaUG9FCH7spaIFE5XPeOXNlK+ft5kuhbstWxGsFz7plf1ibrRii+Z2U
DNamPVhAD6x4/cIzakb57SJ4BWcDoCuyeeG0ICpHyTjEMBq3GH0pvt4bVsSIWUC8
3LrUYAkuKrtxeSBHuJ0eAMilpkz9rld8tl58FUiMW1ZkanSYYB/GV8ENhAruFvVL
bvlgJ0vsOBg1FRXGC8LUUsXiw2owUP4z7Dgtl3Q5eZ+Zb1K/OAdbnmrkXbu/PpiR
E50qQig/Ugxlg9XDdWCgANfFRfhdi2btA+qfP7aSJt+0Kf60GxmQtUGbHm+Q0ECP
L03ZEFG33K/3xu26CFXjWQRwlFGMAAUF5BEiFuLDJ96rhwU5blHjV/lZ1e1rEyv1
uRjdJ06slyv78uLanqIXyMqH1nXBlu/RyayrqTJW1Jdo0GX3iSoF7SR1A8zPbf3r
3d/PmRfY2/1/okIcFYc0tkqq9fTvi0M+ixVIdPmYzoVuzsiP/y5tBM+7CT5YxY+q
0KnOMeWlDzFguSEdha+e
=KRMx
-----END PGP SIGNATURE-----

Gabriel

unread,
Sep 28, 2016, 3:32:40 AM9/28/16
to Andrew David Wong, qubes...@googlegroups.com


On 2016-09-27 06:59, 'Gabriel' via qubes-users wrote:
> Hi fellows,
>
> I started using qubes a while ago and I have a question concerning backups.
> What I want is a complete backup to a dedicated external USB HDD. I understand to achieve this all the VMs must be shut down.
> Therefore when I plugged in the HDD I mounted it in dom0 under /mnt.
>

>This is fine as long as you trust the USB device you're attaching to dom0. If you don't, consider using a USB qube instead:

The USB device is trsted but I'll consider the usb-cube too.

> Questions:
> 1. When I ran Qubes VM Manager -> Backup VMs, I received an error message stating no place on device and a zero byte backup file. Permissions are OK, there's more than enough space on the HDD.
> Any reasons why the backup did not succeed?
>

>Are you sure you selected the correct device in the menu?
There was only one option ....

> 2. I tried running qvm-backup from the command line, which ran fine, no permission problems on the same HDD. However, the template VMs are not included by default and I saw no command-line option to automatically achieve this. Am I missing something here?
>

>The RPM-managed TemplateVMs should normally not be backed up. Instead, you should clone them (if you can spare the drive space), make your customizations, then back up the clones.
Does this imply the AppVMs should be based upon the cloned VMs?

> 3. I know I can manually list all the VMs on the command line to be backed up, but I find that a bit awkward, so I tried this:
> qvm-ls --raw-list | xargs qvm-backup /mnt/test/
>
> but this threw a Python exception...
>
> For now I resorted to typing all the VMs by hand ... not elegant.
>
> Any help is appreciated.
>

Try this:

$ qvm-backup /mnt/test/ `qvm-ls --raw-list`

This one works nice, thank you.

Gabe

Andrew David Wong

unread,
Sep 29, 2016, 9:32:12 AM9/29/16
to Gabriel, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2016-09-28 00:32, Gabriel wrote:
> On 2016-09-27 06:59, 'Gabriel' via qubes-users wrote:
>> 2. I tried running qvm-backup from the command line, which ran fine, no permission problems on the same HDD. However, the template VMs are not included by default and I saw no command-line option to automatically achieve this. Am I missing something here?
>>
>
>> The RPM-managed TemplateVMs should normally not be backed up. Instead, you should clone them (if you can spare the drive space), make your customizations, then back up the clones.
> Does this imply the AppVMs should be based upon the cloned VMs?
>

Correct.

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJX7RfIAAoJENtN07w5UDAwfJoQAMOEl75O7pfUH1bddOcBrAmD
+q+ocQta8pEjI3j3atG1pxcuTUDFrG32BkrZ7OrbIBEOw3PeapNYh0ht1peamdx7
UJJ9uk5LJ1RE2yiKSAB80mRntgJUEI/MimblEPkG/wPFFlJi1drp0gAA42y0oBg3
ioYmsEoX3buCxN9nj2iOdLsqe+WVlMJJwK1tmBIoryEfvuKmiGlMfuI/Y0zJFSPM
TWWhHtPwu83lhZRQW/bk1PU0nP3m8iFr9ia3orYZaGODnHs6ukCQJfFmlNRsCg/5
BFuuIYdm3lUBdyXobzYHtJea5N/XACWl+QHW58a0YQij7ZfqFAvlynP5SKujrTuU
BMbxHJ8DCfdOjv8lazgt4a0fac82whXXr/qSGMePz/ROzhiQy1jFtAB4/vXe4OKM
SrHh97jKdROp9TcH7SLSIg+inSOqMUk3Ax8IVvJ8V1rij+VWz67FJdf2g/FmgS2b
LL6ZTTeHE+EAI1ToT2QSmp3hbWmjNSRSuzFT/bj0GpqwK/IJpRLLOwirOGoU8DRl
Mq6QLmhU0mV5dgVs92MH3Ekyk06qUh9v5RbhkTJJTg0yQnloAa6JTcsNnB2m5HKq
vFAUjMOmJ3Juz+BmSUwhm+chmVqoC0iHVkspTpoMjutELCmhi9IVN1b79P7eVFNG
AA33k2NAdCAm8Zlc4Y/Z
=Pge6
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages