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 40E2C1FF0AE for ; Tue, 15 Sep 2026 18:01:06 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9F97121614; Tue, 15 Sep 2026 18:00:59 +0200 (CEST) From: Shan Shaji To: pbs-devel@lists.proxmox.com Subject: [RFC PATCH proxmox-backup 3/4] datastore: api: add option to rebuild S3 chunk markers Date: Tue, 15 Sep 2026 17:59:34 +0200 Message-ID: <20260915155935.135460-4-s.shaji@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260915155935.135460-1-s.shaji@proxmox.com> References: <20260915155935.135460-1-s.shaji@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789488041216 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.457 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: QVDXUVKO6DQAZHY7GOMXKT32YUNN3ZRE X-Message-ID-Hash: QVDXUVKO6DQAZHY7GOMXKT32YUNN3ZRE X-MailFrom: s.shaji@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 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: Add the optional `rebuild-chunk-markers` flag to the datastore `s3-refresh` API endpoint. When enabled, the refresh lists all chunk objects in S3 and recreates their local marker files. Existing local chunk files are replaced with empty marker files. The option is disabled by default. Signed-off-by: Shan Shaji --- src/api2/admin/datastore.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 34907fa0a..5df5a6b63 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -2835,6 +2835,13 @@ pub async fn unmount(store: String, rpcenv: &mut dyn RpcEnvironment) -> Result Result Result { +pub fn s3_refresh( + store: String, + rebuild_chunk_markers: bool, + rpcenv: &mut dyn RpcEnvironment, +) -> Result { let auth_id: Authid = rpcenv.get_auth_id().unwrap().parse()?; let to_stdout = rpcenv.env_type() == RpcEnvironmentType::CLI; @@ -2867,7 +2878,7 @@ pub fn s3_refresh(store: String, rpcenv: &mut dyn RpcEnvironment) -> Result