public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
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	[thread overview]
Message-ID: <20260425140927.928214-2-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260425140927.928214-1-c.ebner@proxmox.com>

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 <c.ebner@proxmox.com>
---
 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<Option<DataBlob>, 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





  reply	other threads:[~2026-04-25 14:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-25 14:09 [PATCH proxmox-backup 0/3] fixup client log fetching and decryption Christian Ebner
2026-04-25 14:09 ` Christian Ebner [this message]
2026-04-25 14:09 ` [PATCH proxmox-backup 2/3] sync: use log sender for logging when fetching client log Christian Ebner
2026-04-25 14:09 ` [PATCH proxmox-backup 3/3] sync: decrypt client log on pull with matching decryption key Christian Ebner
2026-04-25 19:37 ` applied: [PATCH proxmox-backup 0/3] fixup client log fetching and decryption Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260425140927.928214-2-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal