[SOLVED] Pct restore lxc container with PBS

Florius

Well-Known Member
Jul 2, 2017
35
9
48
57
Hi,

Is it possible to use pct restore to restore a LXC container when a backup is made in PBS?
pct help restore doesn't seem to have any arguments to support that.

I'd like to convert privileged containers to unprivileged, but for that I need to add the flag "-ignore-unpack-errors 1".
Otherwise it results in the error "Error: error extracting archive - error at entry "random": failed to create device node: Operation not permitted (os error 1)".

Thank you!
 
Is it possible to use pct restore to restore a LXC container when a backup is made in PBS?
Yes.

have you restored the LXC like the below command?

Bash:
pct restore 9002 PBS:backup/ct/9001/2021-02-28T18:11:58Z -storage local-zfs --unprivileged 1

see also the pct man page
 
  • Like
Reactions: Florius
Thank you kindly. Am I total blind, because it's not under pct restore in the man page.
It doesn't give an example, or even state that you can refer to a PBS store.

EDIT:

# pct restore 110 backup:backup/ct/100/2021-05-28T10:37:41Z -storage local-lvm -unprivileged 1 -ignore-unpack-errors 1
recovering backed-up configuration from 'backup:backup/ct/100/2021-05-28T10:37:41Z'
Logical volume "vm-110-disk-0" created.
Creating filesystem with 2621440 4k blocks and 655360 inodes
Filesystem UUID: 7fb8e090-3b20-485f-a059-7f9e44fc2487
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
restoring 'backup:backup/ct/100/2021-05-28T10:37:41Z' now..
Error: error extracting archive - error at entry "random": failed to create device node: Operation not permitted (os error 1)
Logical volume "vm-110-disk-0" successfully removed
unable to restore CT 110 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- /usr/bin/proxmox-backup-client restore '--crypt-mode=none' ct/100/2021-05-28T10:37:41Z root.pxar /var/lib/lxc/110/rootfs --allow-existing-dirs --repository root@pam@backup:backup' failed: exit code 255

Any clue what I am doing wrong...?
 
Last edited:
can you try to restore it as privileged?
also please post the output of the following commands:
Bash:
pveversion -v #on PVE
proxmox-backup-manager versions --verbose #on PBS
pct config 100 on #PVE
 
can you try to restore it as privileged?
also please post the output of the following commands:
Bash:
pveversion -v #on PVE
proxmox-backup-manager versions --verbose #on PBS
pct config 100 on #PVE

Restoring as privileged works. Though I want to convert them from privileged > unprivileged.

# pveversion -v
proxmox-ve: 6.4-1 (running kernel: 5.4.106-1-pve)
pve-manager: 6.4-6 (running version: 6.4-6/be2fa32c)
pve-kernel-5.4: 6.4-2
pve-kernel-helper: 6.4-2
pve-kernel-5.4.114-1-pve: 5.4.114-1
pve-kernel-5.4.106-1-pve: 5.4.106-1
pve-kernel-5.4.73-1-pve: 5.4.73-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.1.2-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.20-pve1
libproxmox-acme-perl: 1.1.0
libproxmox-backup-qemu0: 1.0.3-1
libpve-access-control: 6.4-1
libpve-apiclient-perl: 3.1-3
libpve-common-perl: 6.4-3
libpve-guest-common-perl: 3.1-5
libpve-http-server-perl: 3.2-2
libpve-storage-perl: 6.4-1
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.6-2
lxcfs: 4.0.6-pve1
novnc-pve: 1.1.0-1
proxmox-backup-client: 1.1.7-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.5-5
pve-cluster: 6.4-1
pve-container: 3.3-5
pve-docs: 6.4-2
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-3
pve-firmware: 3.2-3
pve-ha-manager: 3.1-1
pve-i18n: 2.3-1
pve-qemu-kvm: 5.2.0-6
pve-xtermjs: 4.7.0-3
qemu-server: 6.4-2
smartmontools: 7.2-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 2.0.4-pve1


# proxmox-backup-manager versions --verbose
proxmox-backup unknown running kernel: 5.4.106-1-pve
proxmox-backup-server 1.1.8-1 running version: 1.1.5
ifupdown2 3.0.0-1+pve3
libjs-extjs 6.0.1-10
proxmox-backup-docs 1.1.8-1
proxmox-backup-client unknown
proxmox-mini-journalreader 1.1-1
proxmox-widget-toolkit 2.5-6
pve-xtermjs 4.7.0-3
smartmontools 7.2-pve2
zfsutils-linux 2.0.4-pve1

# pct config 104
arch: amd64
cmode: tty
console: 1
cpulimit: 0
cpuunits: 1024
features: nesting=1
hostname: grafana
memory: 1024
net0: name=eth0,bridge=vmbr0,hwaddr=A2:DB:30:A4:F7:91,ip=dhcp,type=veth
onboot: 0
ostype: debian
protection: 0
rootfs: local-lvm:vm-104-disk-0,size=30G
swap: 512
tty: 2
 
In the output of PBS versions shows:


please consider installing the proxmox-backup inside the PBS
Code:
apt install proxmox-backup

Hi,

root@backup:~# proxmox-backup-manager versions --verbose
proxmox-backup 1.0-4 running kernel: 5.4.114-1-pve
proxmox-backup-server 1.1.9-1 running version: 1.1.9
pve-kernel-5.4 6.4-2
pve-kernel-helper 6.4-2
pve-kernel-5.4.114-1-pve 5.4.114-1
ifupdown2 3.0.0-1+pve3
libjs-extjs 6.0.1-10
proxmox-backup-docs 1.1.9-1
proxmox-backup-client 1.1.9-1
proxmox-mini-journalreader 1.1-1
proxmox-widget-toolkit 2.5-6
pve-xtermjs 4.7.0-3
smartmontools 7.2-pve2
zfsutils-linux 2.0.4-pve1

Still gives the same error.
 
Hi,
this is currently not implemented for PBS backups. As a workaround, you'll need to backup to some other storage before using the --ignore-unpack-errors option.
 
Any news about fixing issue ? Now PBS is useless for unpriv CTs.

Current workaround:
  • Restore as privileged from PBS
  • Backup to local storage
  • Restore from local storage as unprivileged and ignore-unpack-errors:
Code:
pct restore 803 /hddpool/vz/dump/vzdump-lxc-803-2023_08_01-09_44_49.tar.zst --storage nvm-dir --unprivileged 1 --ignore-unpack-errors 1
 
Last edited:
Hi,
Any news about fixing issue ? Now PBS is useless for unpriv CTs.

Current workaround:
  • Restore as privileged from PBS
  • Backup to local storage
  • Restore from local storage as unprivileged and ignore-unpack-errors:
Code:
pct restore 803 /hddpool/vz/dump/vzdump-lxc-803-2023_08_01-09_44_49.tar.zst --storage nvm-dir --unprivileged 1 --ignore-unpack-errors 1
usually, you shouldn't have unpack errors in the first place. For what kind of entry do you get it?

Pinging the assignee of the feature request @Max Carrara - friendly reminder :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!