From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E3AEE94292 for ; Wed, 21 Sep 2022 10:41:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CF283255B9 for ; Wed, 21 Sep 2022 10:41:11 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 21 Sep 2022 10:41:10 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 960C3442E8 for ; Wed, 21 Sep 2022 10:41:10 +0200 (CEST) Date: Wed, 21 Sep 2022 10:41:03 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20210908100427.3166320-1-f.gruenbichler@proxmox.com> In-Reply-To: <20210908100427.3166320-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1663749603.2bplvka9ue.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.148 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [RFC container] fix #3606: drop --inplace from suspend backups X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2022 08:41:41 -0000 ping - this still regularly hits users in the forum, and given rsyncs=20 rather terse output it's really hard to disambiguate from other error=20 conditions causing error "23". On September 8, 2021 12:04 pm, Fabian Gr=C3=BCnbichler wrote: > 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. >=20 > 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. >=20 > 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. >=20 > additionaly, this commit drops the now no longer needed $first parameter > previously used to decide between different parameters for first and > second rsync run. >=20 > 0: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/com= mit/?id=3D30aba6656f61ed44cba445a3c0d38b296fa9e8f5 > 1: https://salsa.debian.org/debian/procps/-/commit/299f4a1a10810e2995e666= 374b880b543af8e8e4 >=20 > Signed-off-by: Fabian Gr=C3=BCnbichler > --- > RFC in case anybody has a better solution other than setting the sysctl > to 0 again ;) >=20 > src/PVE/VZDump/LXC.pm | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) >=20 > diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm > index b7f7463..19b5c16 100644 > --- a/src/PVE/VZDump/LXC.pm > +++ b/src/PVE/VZDump/LXC.pm > @@ -20,7 +20,7 @@ use base qw (PVE::VZDump::Plugin); > my $default_mount_point =3D "/mnt/vzsnap0"; > =20 > my $rsync_vm =3D sub { > - my ($self, $task, $to, $text, $first) =3D @_; > + my ($self, $task, $to, $text) =3D @_; > =20 > my $disks =3D $task->{disks}; > my $from =3D $disks->[0]->{dir}; > @@ -32,8 +32,7 @@ my $rsync_vm =3D sub { > =20 > my $rsync =3D ['rsync', '--stats', '-h', @xattr, '--numeric-ids', > '-aH', '--delete', '--no-whole-file', > - ($first ? '--sparse' : '--inplace'), > - '--one-file-system', '--relative']; > + '--sparse', '--one-file-system', '--relative']; > push @$rsync, "--bwlimit=3D$opts->{bwlimit}" if $opts->{bwlimit}; > push @$rsync, map { "--exclude=3D$_" } @{$self->{vzdump}->{findexcl}= }; > push @$rsync, map { "--exclude=3D$_" } @{$task->{exclude_dirs}}; > @@ -260,13 +259,13 @@ sub copy_data_phase1 { > } > } > =20 > - $self->$rsync_vm($task, $task->{snapdir}, "first", 1); > + $self->$rsync_vm($task, $task->{snapdir}, "first"); > } > =20 > sub copy_data_phase2 { > my ($self, $task) =3D @_; > =20 > - $self->$rsync_vm($task, $task->{snapdir}, "final", 0); > + $self->$rsync_vm($task, $task->{snapdir}, "final"); > } > =20 > sub stop_vm { > --=20 > 2.30.2 >=20 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20