[lxc-users] Correct way to rsync /var/lib/lxd

Mark Constable markc at renta.net
Sat Aug 8 15:16:43 UTC 2015


I'm just trying to do a simple rsync backup of /var/lib/lxd/ to a local NAS and get
these errors as root on the host. I understand the issue of subgids and subuids not
being valid on the target machine (the below errors are coming from the destination)
outside the normal range of uid/gids but I'm still not sure of the best flags, if any,
to provide for rsync to get around this? Or is there a better way to backup containers?


rsync: delete_file: rmdir(lxc/container1/rootfs) failed: Permission denied (13)
rsync: delete_file: unlink(lxc/container1/metadata.yaml) failed: Permission denied (13)
cannot delete non-empty directory: lxc/container1
rsync: delete_file: rmdir(lxc/container1) failed: Permission denied (13)
rsync: delete_file: unlink(lxc/lxc-monitord.log) failed: Permission denied (13)
cannot delete non-empty directory: lxc
rsync: failed to set times on "/mbox/var/lib/lxd/unix.socket" (in backups): Operation not permitted (1)
rsync: recv_generator: mkdir "/mbox/var/lib/lxd/containers" (in backups) failed: Permission denied (13)



More information about the lxc-users mailing list