aaaahh I already saw it, but I was typing qubes-backup instead of qvm-backup, my bad
Yes. I also make this mistake sometimes. In general qubes-*
commandline tools apply to the system and qvm-*
are applied to a particular qube.
Because there is no example on the documentation, I’m putting some here if someone need it :
qvm-backup --no-compress --yes --dest-vm vault /path/of/my/folder
qvm-backup --verbose --no-compress --yes --dest-vm vault /path/of/my/folder
qvm-backup --compress --yes --dest-vm vault /path/of/my/folder
I was just perusing the documentation in order to see some command line usage examples for qvm-backup
utility. Thanks for these examples but these three only seem to scratch the surface of the capabilities of Qubes Backup GUI.
For example, how do I tell the command line tool qvm-backup
to exclude certain qubes from back ups? How do I tell it to include only dom0 home folder to the backups? How do I decide how’s my usage profile saved and stored?
It would be helpful to see such examples, too.
man qvm-backup
is your friend:
--exclude, -x
--save-profile
I mean, I checked the man qvm-backup
but it’s pretty barebones. For example, does the --exclude
take comma separated variables if I want to exclude more than one qubes?
Never used it, you can try.
It does say:
may be repeated
so you could run qvm-backup -x VM1 -x VMn
.
OK, so I read the man page. And I prepared a qubes-manager-backup.conf
file as follows:
$ cat ~/.config/qubes-manager-backup.conf
compression: true
destination_path: /media/user/GOODLUCK
destination_vm: personal
include:
- dom0
passphrase_text: mymypassphrase
And then I run the qvm-backup
as follows:
$ qvm-backup --profile ~/.config/qubes-manager-backup.conf
which returns
$ qvm-backup --profile ~/.config/qubes-manager-backup.conf
Backup preparation error: Got empty response from qubesd. See journalctl in dom0 for details.
I look at the journalctl
, and the related line reads:
qubesd[1914]: permission denied for call b'admin.backup.Info'+b'/home/tanky0u/.config/qubes-manager-backup.conf' (b'dom0' -> b'dom0') with payload of 0 bytes
Running the same qvm-backup
command with sudo
gives the same error. Any other tips?
man qvm-backup
will help
Yes, someone else suggested reading the man page, too. In the following conversation under this thread, I wrote that I had read the man, and I was having another problem with using the qvm-backup in the command line. Please see that post of mine.
Haven’t used it but try to place the config file in /root
(taking care of permissions) and run it again with sudo.
# mkdir -p /root/.config
# cat /home/user/.config/qubes-manager-backup.conf | tee /root/.config/qubes-manager-backup.conf
If you run the above as root, perms will be taken care of.
From your suggestion, I thought that perhaps having the --profile
file in my user’s home directory wasn’t allowing the admin user to reach that file, since my ~/.config
is only reachable by my user.
So, I just moved the file to /etc/qubes/backup/
folder. The file’s user and group are my user’s, however, “other” has “read” permissions, too.
Mind you that this is where the default --profile
file resides, also.
However, running the same command with the updated location of the --profile
file still gives the same error.
Before I do your suggested solution, I wanted to point this strangeness out. Why is the command still failing even though it has the read permissions given?
I’m not sure, but you could still try to re-make (with cat
and tee
) that file instead of moving it.
Used your suggestion (cat
and tee
), and re-run the qvm-backup
command with
$ sudo qvm-backup --profile /root/.config/qubes-manager-backup.conf
However, it gave the same “Backup preparation error:” as in the above posts.
The command without sudo
also gives the same error.
This is getting awkward and frustrating. I just wanted to use the command line while doing backups.
journalctl | grep qubesd
^^ Disregard, I just realized that’s where the error came from.
qubesd[2118]: permission denied for call b'admin.backup.Info'+b'/root/.config/qubes-manager-backup.conf' (b'dom0' -> b'dom0') with payload of 0 bytes
I have the destination usb-drive in qube “personal” with the following permissions:
drwxrwxrwx root root
I have the profile under my /etc/qubes/backup/ folder with the following permissions:
-rw-rw-r-- user user
Having said that, how do I change the “group” of the destination USB folder, to “qubes” ? Does such a user already exist in that qube?
This works for me, try it as a test with some empty qube:
$ ls /etc/qubes/backup -la
total 16
drwxrwx--- 2 root qubes 4096 May 18 01:54 .
drwxr-xr-x 8 root root 4096 May 10 20:44 ..
-rw-rw-r-- 1 user user 104 Jun 15 14:40 qubes-manager-backup.conf
$ cat /etc/qubes/backup/qubes-manager-backup.conf
compression: true
destination_path: /tmp/
destination_vm: vault
include:
- personal
passphrase_text: 'test'
$ qvm-backup --profile qubes-manager-backup
Hey doing this has worked! Thanks!
$ qvm-backup --profile only_dom0
The only_dom0.conf
file resides in /etc/qubes/backup/only_dom0.conf
and its filename owner/group and permissions are the same as in your example.
Now I am just wondering whether the source of the bug I had was:
1/ not having the passphrase_text
string within single quotes (’)
2/ not designating the --profile
argument as single file name (instead, I always gave the full path with .conf
file extension)