From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 0F9C81FF0AB for ; Wed, 09 Sep 2026 14:32:19 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 14B5021629; Wed, 09 Sep 2026 14:32:12 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH proxmox-backup 22/28] sync: pull: protect retained snapshot from being overwritten From: Robert Obkircher To: Christian Ebner In-Reply-To: <20260813171002.809441-23-c.ebner@proxmox.com> References: <20260813171002.809441-1-c.ebner@proxmox.com> <20260813171002.809441-23-c.ebner@proxmox.com> Date: Wed, 09 Sep 2026 14:32:04 +0200 Message-Id: <178895712462.166875.1769115705092177610.b4-review@b4> X-Mailer: b4 0.16-dev X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788957117935 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.567 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: OMQ2G3BY34C7KOJQT7KON5LJLHFR6P4Q X-Message-ID-Hash: OMQ2G3BY34C7KOJQT7KON5LJLHFR6P4Q X-MailFrom: r.obkircher@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pbs-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: > During a resync, a protected snapshot might be overwritten, which > must not be allowed if it is still protected by a retention timespan. > > Signed-off-by: Christian Ebner > > diff --git a/src/server/pull.rs b/src/server/pull.rs > index 816e64ce7..893b642d4 100644 > --- a/src/server/pull.rs > +++ b/src/server/pull.rs > @@ -768,6 +768,17 @@ async fn pull_snapshot<'a>( > return Ok(None); > } > > + if let Some(manifest) = &existing_target_manifest { > + if let Some(retain_until) = manifest.retention_timestamp()? { > + if retain_until > proxmox_time::epoch_i64() { > + bail!( > + "Cannot resync target manifest since retention locked until '{}'", > + proxmox_time::epoch_to_rfc3339(retain_until)?, If I pull-sync twice the second one triggers this error. -- Robert Obkircher