[Bug?] It is possible to start stopped LXC container while is is backup'd

dirk.nilius

Member
Nov 5, 2015
47
0
6
Berlin, Germany
Hi,

I found out that when a container is stopped the backup is doing a 'stopped' mode backup as well it's configured to snapshot. Now I can start the container while the backup is running. After that there is R/W action on the container file system which makes the backup inconsistent. If you are lucky the backup script figures out it's failure (like in the log below).

Note: Backup type is snapshot. So the solution should be either to use snapshot mode as well on stopped containers or lock it while backup.

NFO: Starting Backup of VM 208 (lxc)
INFO: status = stopped
INFO: backup mode: stop
INFO: bandwidth limit: 51200 KB/s
INFO: ionice priority: 7
INFO: creating archive '/mnt/pve/FreeNAS/dump/vzdump-lxc-208-2015_12_12-12_37_32.tar.lzo'
INFO: tar: ./var/www/owncloud/data/owncloud.log: file changed as we read it
INFO: tar: ./var: file changed as we read it
INFO: tar: .: file changed as we read it
INFO: Total bytes written: 12971069440 (13GiB, 25MiB/s)
ERROR: Backup of VM 208 failed - command 'set -o pipefail && tar cpf - --totals --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-xattr-write' --one-file-system '--warning=no-file-ignored' '--directory=/tmp/vzdumptmp26953' ./etc/vzdump/pct.conf ./etc/vzdump/pct.fw '--directory=/mnt/vzsnap0' --no-anchored '--exclude=lost+found' --anchored ./ | cstream -t 52428800 | lzop >/mnt/pve/FreeNAS/dump/vzdump-lxc-208-2015_12_12-12_37_32.tar.dat' failed: exit code 1


root@ckc-b-p0005:~# pveversion -v
proxmox-ve: 4.1-26 (running kernel: 4.2.6-1-pve)
pve-manager: 4.1-1 (running version: 4.1-1/2f9650d4)
pve-kernel-4.2.6-1-pve: 4.2.6-26
pve-kernel-4.2.2-1-pve: 4.2.2-16
pve-kernel-4.2.3-2-pve: 4.2.3-22
lvm2: 2.02.116-pve2
corosync-pve: 2.3.5-2
libqb0: 0.17.2-1
pve-cluster: 4.0-29
qemu-server: 4.0-41
pve-firmware: 1.1-7
libpve-common-perl: 4.0-41
libpve-access-control: 4.0-10
libpve-storage-perl: 4.0-38
pve-libspice-server1: 0.12.5-2
vncterm: 1.2-1
pve-qemu-kvm: 2.4-17
pve-container: 1.0-32
pve-firewall: 2.0-14
pve-ha-manager: 1.0-14
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u1
lxc-pve: 1.1.5-5
lxcfs: 0.13-pve1
cgmanager: 0.39-pve1
criu: 1.6.0-1
zfsutils: 0.6.5-pve6~jessie
 

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!