Hello,
I run proxmox VE 5.4 w/ ZFS root on a standalone host. I'm in the process of migrating to a two-node cluster. Both are hosted @OVH.
Once the new setup is ready, I plan to move my existing CTs (no VMs) by backup/restore technique. Please note that the CTs were created in unprivileged mode.
For now I'm in the testing phase and I realized that the backups can't be restored as unprivileged.
The command used is :
It fails with the following log :
Using the command :
works like a charm, but I loose the benefits of keeping the setup as safe as possible.
I made a small research and found similar threads in the past :
Is it due to using ZFS ? I can't tell.
Is there a better way to fix the issue ?
I run proxmox VE 5.4 w/ ZFS root on a standalone host. I'm in the process of migrating to a two-node cluster. Both are hosted @OVH.
Once the new setup is ready, I plan to move my existing CTs (no VMs) by backup/restore technique. Please note that the CTs were created in unprivileged mode.
For now I'm in the testing phase and I realized that the backups can't be restored as unprivileged.
The command used is :
pct restore 100 /var/lib//vz/dump/vzdump-lxc-100-2020_11_29-17_38_20.tar.lzo -unprivileged -storage local-zfs
It fails with the following log :
Code:
extracting archive '/var/lib/vz/dump/vzdump-lxc-100-2020_11_29-17_38_20.tar.lzo'
tar: ./var/local: Cannot mkdir: Permission denied
...
tar: ./var/spool/plymouth: Cannot mkdir: No such file or directory
Total bytes read: 2163251200 (2.1GiB, 91MiB/s)
tar: Exiting with failure status due to previous errors
unable to restore CT 100 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf - --lzop --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' -C /var/lib/lxc/100/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2
Using the command :
pct restore 100 /var/lib//vz/dump/vzdump-lxc-100-2020_11_29-17_38_20.tar.lzo -storage local-zfs
works like a charm, but I loose the benefits of keeping the setup as safe as possible.
I made a small research and found similar threads in the past :
- mkdir denied when restoring backup (looks close to my issue, but not resolved)
- [SOLVED] Unable to restore an LXC unprivileged container ("solution" is to forget about privileged mode)
Unprivileged containers(this one tries to convert privileged to unprivileged CT on-the-fly which is another story)- [SOLVED] Restore unprivileged LXC failes (this one looks like it was a privileged CT from start)
- CT restore problem with ZFS (this one is promising)
- execute restore command in a screen window
pct restore 100 /var/lib//vz/dump/vzdump-lxc-100-2020_11_29-17_38_20.tar.lzo -unprivileged -storage local-zfs
- In another screen window execute workaround
setfacl -R -m user:100000:rwX /rpool/data/subvol-100-disk-0
- you must do it quick, that is execute the setfacl command before the restore gets to the point it tries to restore the /var/ directory
- you might need to install acl tools
apt-get install acl
- you might need to update the path
/rpool/data/subvol-100-disk-0
with the right CT numbers (e.g. 101, 102,...) and the right disk number (0, 1...) for example/rpool/data/subvol-155-disk-17
Is it due to using ZFS ? I can't tell.
Is there a better way to fix the issue ?
Last edited: