]> git.proxmox.com Git - pve-container.git/commit
fix #3606: drop --inplace from suspend backups
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 8 Sep 2021 10:04:27 +0000 (12:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 8 Nov 2022 17:25:06 +0000 (18:25 +0100)
commita79e80fd615572abb3e04c9c38f3e53dc055d511
treed71c0262902145b5d16531ea9f917826de5f7194
parent69121dd2fa7de408de6657ab99dcb428dff071c0
fix #3606: drop --inplace from suspend backups

for bullseye-based systems, the 'fs.protected_regular'[0] sysctl is set
to '2' by default[1] (as opposed to the old value of '0'). this breaks
rsync's `--inplace` mode for such protected files, since opening them
with O_CREAT is not even possible for the root user anymore.

one example in the wild are debian (-based) containers using PHP, where
the session dir '/var/lib/php/sessions' is sticky, world-writable, owned
by root and contains sessions files usually owned by www-data. if any of
these session files are modified between the first and second rsync run,
the second run and thus the backup will fail.

the downside of this change is that containers with large files that are
updated between the first and second run will now see more (temp) space
usage - but suspend mode is not space efficient anyway and such setups
should consider switching to snapshot mode anyway.

additionaly, this commit drops the now no longer needed $first parameter
previously used to decide between different parameters for first and
second rsync run.

0: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30aba6656f61ed44cba445a3c0d38b296fa9e8f5
1: https://salsa.debian.org/debian/procps/-/commit/299f4a1a10810e2995e666374b880b543af8e8e4

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/VZDump/LXC.pm