LXC (unprivileged) backup task failing

Discussion in 'Proxmox VE: Installation and configuration' started by Pavel Hruška, Nov 5, 2018.

  1. Pavel Hruška

    Pavel Hruška New Member

    Joined:
    May 1, 2018
    Messages:
    28
    Likes Received:
    2
    Hello everyone, I've created and set up my first unprivileged LXC container, everything was okay until I've run into problems with backing up this LXC. The backup is failing with this error:

    Code:
    ERROR: Backup of VM 320 failed - command 'set -o pipefail && lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar cpf - --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' --one-file-system '--warning=no-file-ignored' '--directory=/mnt/pve/XXX/dump/vzdump-lxc-320-2018_11_05-07_23_29.tmp' ./etc/vzdump/pct.conf '--directory=/mnt/vzsnap0' --no-anchored '--exclude=lost+found' --anchored '--exclude=./tmp/?*' '--exclude=./var/tmp/?*' '--exclude=./var/run/?*.pid' ./ ./var/ftp | pigz -p 2 >/mnt/pve/XXX/dump/vzdump-lxc-320-2018_11_05-07_23_29.tar.dat' failed: exit code 2
    Any ideas? I am lost how to debug this...
     
  2. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,775
    Likes Received:
    251
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Pavel Hruška

    Pavel Hruška New Member

    Joined:
    May 1, 2018
    Messages:
    28
    Likes Received:
    2
    Great, that did the trick (EDIT: Yes, backup target is on NFS storage).

    May I ask why the tmpdir is needed for the backup? And is the unprivileged LXC cause of the problem?

    Thank you.
     
  4. Pavel Hruška

    Pavel Hruška New Member

    Joined:
    May 1, 2018
    Messages:
    28
    Likes Received:
    2
    I'm just curious if the backup data are passing thru the tmp dir when backing up - just in case my tmp is on SSD, would it wear my drive out by backups?
     
  5. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,775
    Likes Received:
    251
    yes, that is the purpose of the tmpdir

    depends on your disk/how much you backup/the amount of data/etc
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Pavel Hruška

    Pavel Hruška New Member

    Joined:
    May 1, 2018
    Messages:
    28
    Likes Received:
    2
    Okay, that's not the best news (SSD will be (slowly) worn out by buckups), but okay. I'm glad to know how things works. LXC is full of pros/cons needed to be considered when designing stuff. Good to know.

    Thank you for answers!
     
  7. GPLExpert

    GPLExpert New Member
    Proxmox VE Subscriber

    Joined:
    Jul 18, 2016
    Messages:
    12
    Likes Received:
    0
    Hello,

    For this tmpdir option, what capacity we need to use ?
     
  8. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,775
    Likes Received:
    251
    the maximum size of the biggest container you want to backup, since all files of a container will be copied there temporarily
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice