You can't backup all vms in one simple step if you are not mounting a
local backup drive directly in dom0 (which can be risky). So the key is
to use a single appvm (i.e. USBVM) for local backups which has little or
no customization (therefore its a vm not really needing backup and can
be replaced with almost no effort).
For remote backups, having netvm and firewallvm that are non-custom is
also ideal. On top of that, you should have a 'backupvm' appvm that can
make the high-level connections for whatever service you use (ssh, ftp,
etc). The backup process itself uses Unix pipes if you choose a vm as
destination. (In the GUI) you can choose backupvm as a target appvm,
then on the line right below type a command that will run in the vm and
receive the backup file as input.
So adding an ssh command will result in something like 'cat
backupDATETIME.tar | ssh' being run inside the backupvm. Of course you
would have to flesh-out that ssh command with connection parameters and
a way to handle the remote output; probably so it looks something like this:
ssh user@remotesystem 'cat >/path/backupDATETIME.tar'
Additionally, since dom0 /home/user is usually included in backups by
default, you could occasionally perform a backup of said
USB/net/firewall/backup vm(s) to a file in dom0. Then they will be
included (in a fashion) in your regular backups.
-
For automation, you could write a script to take the output of qvm-ls
and filter-out the vms you know cannot be directly backed-up. Then do
qvm-shutdown for the ones that are running, use the qvm-backup command,
and finally re-start the vms that were running before.
OTOH, searching for info about Xen live backups (of running vms) turns
up some interesting stuff that might be applicable to Qubes:
http://www.kh-soft.de/?q=node/22