[PATCH proxmox-backup v3 17/30] sync: push: optionally encrypt client log on upload if key is given

Christian Ebner
2026-04-14T12:59:03Z

Encrypt the client log blob with given encryption key during syncs in push
direction, if given. The client log is not part of the manifest and therefore
needs to be handled separately.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 2:
- no changes

src/server/push.rs | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/server/push.rs b/src/server/push.rs
index 75f92b291..a848c989c 100644
--- a/src/server/push.rs
+++ b/src/server/push.rs
@@ -1020,13 +1020,23 @@ pub(crate) async fn push_snapshot(
let client_log_name = &CLIENT_LOG_BLOB_NAME;
client_log_path.push(client_log_name.as_ref());
if client_log_path.is_file() {
- backup_writer
- .upload_blob_from_file(
- &client_log_path,
- client_log_name.as_ref(),
- upload_options.clone(),
+ if encrypt_using_key.is_some() {
+ reencode_encrypted_and_upload_blob(
+ client_log_path,
+ client_log_name,
+ &backup_writer,
+ &upload_options,
)
.await?;
+ } else {
+ backup_writer
+ .upload_blob_from_file(
+ &client_log_path,
+ client_log_name.as_ref(),
+ upload_options.clone(),
+ )
+ .await?;
+ }
}

// Rewrite manifest for pushed snapshot, recreating manifest from source on target,
--
2.47.3