[pve-devel] applied: [RFC container] fix #3606: drop --inplace from suspend backups
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Nov 8 18:27:12 CET 2022
Am 08/09/2021 um 12:04 schrieb Fabian Grünbichler:
> 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 at proxmox.com>
> ---
> RFC in case anybody has a better solution other than setting the sysctl
> to 0 again ;)
doesn't seems like anybody could come up with something better...
>
> src/PVE/VZDump/LXC.pm | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
>
applied, thanks!
More information about the pve-devel
mailing list