Permissions in /etc/libvirt/qemu/


Recommended Posts

Hi all,

 

I have a Duplicati docker taking care of my backups currently and I'm trying to have everything centralized at the same place as much as possible isntead of using different plugins to back up different things. So, Duplicati backs up all my vdisks already and I'm trying to configure it to take care of my VM settings (XML and nvram). So, I configured it for /etc/libvirt/qemu/ with some exclusions and it works for the nvram subfolder but not for the XMLs themselves. I noticed the permissions on the XMLs are set to 600 while the nvram files are 666 so I assume that's the issue here.

 

Now, before changing permissions to the XML files to 644, I have some questions:

  1. Are the XMLs and nvram files in /etc/libvirt/qemu regenerated after each reboot or do changes in that folder magically stay permanent even after a reboot?
  2. (1a) If files are permanent, are permissions persistant? What about new XMLs? What would be the best approach?
  3. (1b) If files are regenerated, I could have User Script run a script to change permissions to 644 every month before Duplicati takes that backup; are there any insensitive in not changing the XML file permissions?

 

Thank you.

Edited by dnLL
Link to comment
On 6/1/2019 at 8:02 AM, itimpi said:

The VM Manager libvirt.img file is mounted at /etc/libvirt so its contents are persistent across reboots and any changes made under /lib/virt are also persistent.  

And libvirt.img being on the array in ./system, losing the flash drive doesn't matter.

 

Is there any reason to backup the full 1GB libvirt.img over just saving what's in /etc/libvirt? The actual content of that FS is very small in comparison to the 1GB IMG container.

 

root@server:~# du -sh /etc/libvirt/
1.0M    /etc/libvirt/

root@server:~# ls -l /lib/virt/
/bin/ls: cannot access '/lib/virt/': No such file or directory

 

Also you mentionned /lib/virt, not sure if there is anything supposed to be in there.

Link to comment
  • 2 years later...

Hi dnLL,

I'm doing the same thing you were doing WAY BACK in 2019, backing up the whole VM, .img, .xml and nvram files in a Duplicati backup.

Have you been happy with this approach?

 

I'm getting efficient results with the .img files.  I have two big VMs, 50GB+ each.  Once the initial full backup is done, the changed block backups go pretty quickly.  I've not done a restore yet, but that's next on my list.

 

I want to add in the xml & nvram files to complete the package.  Did you adjust the owner/permissions on the relevant files in /etc/libvirt/qemu?  (What permissions have you used?)

 

I hope it's all been positive.  Please let me know.

 

Thanks,
Larz

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.