LXC Container - Backup funktioniert nicht

meisterwerk89

New Member
Nov 23, 2024
9
0
1
Hallo.

Bei mir schlägt das Backup von 2 LXC-Containern fehl.
Bei den restlichen Containern und VMs klappt das Backup ohne Probleme.

Hat jemand einen Rat?

Folgendes wird ausgegeben:

Bash:
INFO: starting new backup job: vzdump 101 --compress zstd --mode snapshot --notes-template '{{guestname}}' --storage OpenmediaVault --node proxmox --remove 0
INFO: filesystem type on dumpdir is 'cifs' -using /var/tmp/vzdumptmp4062248_101 for temporary files
INFO: Starting Backup of VM 101 (lxc)
INFO: Backup started at 2025-02-27 21:34:06
INFO: status = running
INFO: CT Name: pihole
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  Logical volume "snap_vm-101-disk-1_vzdump" created.
INFO: creating vzdump archive '/mnt/pve/OpenmediaVault/dump/vzdump-lxc-101-2025_02_27-21_34_06.tar.zst'
INFO: tar: ./var/log/pihole.log: File shrank by 1432141541 bytes; padding with zeros
INFO: Total bytes written: 8338739200 (7.8GiB, 46MiB/s)
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-101-disk-1_vzdump" successfully removed
ERROR: Backup of VM 101 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=/var/tmp/vzdumptmp4062248_101' ./etc/vzdump/pct.conf ./etc/vzdump/pct.fw '--directory=/mnt/vzsnap0' --no-anchored '--exclude=lost+found' --anchored '--exclude=./tmp/?*' '--exclude=./var/tmp/?*' '--exclude=./var/run/?*.pid' ./ | zstd --rsyncable '--threads=1' >/mnt/pve/OpenmediaVault/dump/vzdump-lxc-101-2025_02_27-21_34_06.tar.dat' failed: exit code 1
INFO: Failed at 2025-02-27 21:37:20
INFO: Backup job finished with errors
TASK ERROR: job errors
 
Moin!

Bin mir nicht sicher, aber:

Code:
INFO: tar: ./var/log/pihole.log: File shrank by 1432141541 bytes; padding with zeros
Sagt mir, dass dein pihole Dateien, gerade Log Files, verändert bevor das Backup fährt bzw während das Backup fährt.

Du könntest versuchen:
A: Den LXC Container bevor das Backup läuft in den Read-Only Mode zu setzen, oder
B: Den Dateipfad der Logs auszuschließen.
 
Last edited:
@otherwisegg ... okay, danke. Würde ich versuchen.

Könntest du mir noch erklären wie ich den Container in den Read-only-Modus setze,
oder auch wie ich einen Dateipfad ausschließe?
 
@otherwisegg ... okay, danke. Würde ich versuchen.

Könntest du mir noch erklären wie ich den Container in den Read-only-Modus setze,
oder auch wie ich einen Dateipfad ausschließe?
Ich weiß leider nicht ob das über das GUI geht.

Ich kenne nur:

Code:
vzdump <VMID> --compress zstd --mode snapshot --storage <Storage> --node <nodeName> --remove 0 --exclude-path <"hier/den/pfad">

um z.B den Pfad zu exkludieren und:

Code:
pct set <vm-id> -features "mount=nfs;nesting=1;ro"

um den Container in Readonly zu setzen, dann mit vzdump das Backup fahren

und im Anschluss dann wieder aus dem RO versetzen

Code:
pct set <vm-id> -features "mount=nfs;nesting=1"


Kann man safe auch mit Cronjobs automatisieren.
Oder du setzt fährst die VM vorher herunter, änderst den Backup Typ o.ä
 
Last edited:
  • Like
Reactions: meisterwerk89
@otherwisegg ... hat leider nicht geholfen. Auch das ändern des Backup-Typs sowie vorherige Herunterfahren des LXC-Containers war ohne Erfolg.

Dann ist der Output wie folgt:

Bash:
INFO: starting new backup job: vzdump 101 --remove 0 --compress zstd --mode stop --storage local --notes-template '{{guestname}}' --node proxmox
INFO: Starting Backup of VM 101 (lxc)
INFO: Backup started at 2025-02-28 14:46:54
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: CT Name: pihole
INFO: including mount point rootfs ('/') in backup
INFO: creating vzdump archive '/var/lib/vz/dump/vzdump-lxc-101-2025_02_28-14_46_54.tar.zst'
INFO: tar: ./var/log/pihole.log: File shrank by 1480196533 bytes; padding with zeros
INFO: Total bytes written: 8340899840 (7.8GiB, 86MiB/s)
ERROR: Backup of VM 101 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=/var/lib/vz/dump/vzdump-lxc-101-2025_02_28-14_46_54.tmp' ./etc/vzdump/pct.conf ./etc/vzdump/pct.fw '--directory=/mnt/vzsnap0' --no-anchored '--exclude=lost+found' --anchored '--exclude=./tmp/?*' '--exclude=./var/tmp/?*' '--exclude=./var/run/?*.pid' ./ | zstd --rsyncable '--threads=1' >/var/lib/vz/dump/vzdump-lxc-101-2025_02_28-14_46_54.tar.dat' failed: exit code 1
INFO: Failed at 2025-02-28 14:48:28
INFO: Backup job finished with errors
TASK ERROR: job errors
 
@otherwisegg ... hab es nun doch noch hinbekommen.

Dann über den Ausschluss der problematischen Datei beim Backup. Bei mir dann wie folgt:

Bash:
vzdump 101 --remove 0 --compress zstd --mode stop --storage local --notes-template '{{guestname}}' --node proxmox --exclude-path /var/log/pihole.log

Im Anschluss dann einen Restore durchgeführt. Nun klappt der Backup auch wieder über die Benutzeroberfläche.

BESTEN DANK.