From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 037EF1FF143 for ; Sat, 25 Apr 2026 16:09:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A0C891AF0; Sat, 25 Apr 2026 16:09:43 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 1/3] sync: fix client log fetching for local sync job Date: Sat, 25 Apr 2026 16:09:25 +0200 Message-ID: <20260425140927.928214-2-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260425140927.928214-1-c.ebner@proxmox.com> References: <20260425140927.928214-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777126086756 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 Message-ID-Hash: GKEJEHPI7FZ2O5F5TXEYBCUVHRVGKXZ4 X-Message-ID-Hash: GKEJEHPI7FZ2O5F5TXEYBCUVHRVGKXZ4 X-MailFrom: c.ebner@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: Pulling with a local sync job currently does not handle fetching the client log correctly, completely lacking the implementation. Fix this by adding the missing implementation on the local source reader. Since this does not actually download anything, also rename the method from try_download_client_log() to a now better fitting try_fetch_client_log(). Signed-off-by: Christian Ebner --- src/server/pull.rs | 2 +- src/server/sync.rs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/server/pull.rs b/src/server/pull.rs index 67ab70348..6bb5995cc 100644 --- a/src/server/pull.rs +++ b/src/server/pull.rs @@ -679,7 +679,7 @@ async fn pull_snapshot<'a>( let fetch_log = async || { if !client_log_name.exists() { reader - .try_download_client_log(&client_log_name) + .try_fetch_client_log(&client_log_name) .await .with_context(|| prefix.clone())?; if client_log_name.exists() { diff --git a/src/server/sync.rs b/src/server/sync.rs index d25180341..ad537129b 100644 --- a/src/server/sync.rs +++ b/src/server/sync.rs @@ -103,8 +103,8 @@ pub(crate) trait SyncSourceReader: Send + Sync { /// `into` is the path of the local file to load the source file into. async fn load_file_into(&self, filename: &str, into: &Path) -> Result, Error>; - /// Tries to download the client log from the source and save it into a local file. - async fn try_download_client_log(&self, to_path: &Path) -> Result<(), Error>; + /// Tries to fetch the client log from the source and save it into a local file. + async fn try_fetch_client_log(&self, to_path: &Path) -> Result<(), Error>; fn skip_chunk_sync(&self, target_store_name: &str) -> bool; } @@ -168,7 +168,7 @@ impl SyncSourceReader for RemoteSourceReader { Ok(DataBlob::load_from_reader(&mut tmp_file).ok()) } - async fn try_download_client_log(&self, to_path: &Path) -> Result<(), Error> { + async fn try_fetch_client_log(&self, to_path: &Path) -> Result<(), Error> { let mut tmp_path = to_path.to_owned(); tmp_path.set_extension("tmp"); @@ -229,7 +229,9 @@ impl SyncSourceReader for LocalSourceReader { Ok(DataBlob::load_from_reader(&mut tmp_file).ok()) } - async fn try_download_client_log(&self, _to_path: &Path) -> Result<(), Error> { + async fn try_fetch_client_log(&self, to_path: &Path) -> Result<(), Error> { + self.load_file_into(CLIENT_LOG_BLOB_NAME.as_ref(), to_path) + .await?; Ok(()) } -- 2.47.3