[PATCH proxmox-backup v2 16/27] sync: push: optionally encrypt client log on upload if key is given

Christian Ebner
2026-04-10T17:03:44Z

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>
---
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 7ce47e32e..02718b7b6 100644
--- a/src/server/push.rs
+++ b/src/server/push.rs
@@ -1018,13 +1018,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