[SOLVED] Pct restore lxc container with PBS

Florius

Member
Jul 2, 2017
27
5
8
54
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!
 

Moayad

Proxmox Staff Member
Staff member
Jan 2, 2020
1,052
79
48
28
Vieena
shop.maurer-it.com
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

Florius

Member
Jul 2, 2017
27
5
8
54
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:

Moayad

Proxmox Staff Member
Staff member
Jan 2, 2020
1,052
79
48
28
Vieena
shop.maurer-it.com
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
 

Florius

Member
Jul 2, 2017
27
5
8
54
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
 

Florius

Member
Jul 2, 2017
27
5
8
54
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!