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 DBC4A1FF16B for ; Thu, 28 Nov 2024 13:13:06 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 253058EF4; Thu, 28 Nov 2024 13:13:08 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Thu, 28 Nov 2024 13:12:14 +0100 Message-Id: <20241128121214.261257-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.031 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup] sync: push: also log archive names and upload size X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Include the archive name and upload size/rate as well, as the pull job logs them so the absence might cause confusion. Reported-by: Max Carrara Signed-off-by: Christian Ebner --- src/server/push.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/server/push.rs b/src/server/push.rs index 8f654d4b4..95c7c6bff 100644 --- a/src/server/push.rs +++ b/src/server/push.rs @@ -9,6 +9,8 @@ use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; use tracing::{info, warn}; +use proxmox_human_byte::HumanByte; + use pbs_api_types::{ print_store_and_ns, ApiVersion, ApiVersionInfo, ArchiveType, Authid, BackupArchiveName, BackupDir, BackupGroup, BackupGroupDeleteStats, BackupNamespace, GroupFilter, GroupListItem, @@ -848,12 +850,20 @@ pub(crate) async fn push_snapshot( path.push(&entry.filename); if path.try_exists()? { let archive_name = BackupArchiveName::from_path(&entry.filename)?; + log::info!("Sync archive {archive_name}"); match archive_name.archive_type() { ArchiveType::Blob => { let file = std::fs::File::open(path.clone())?; let backup_stats = backup_writer .upload_blob(file, archive_name.as_ref()) .await?; + log::info!( + "Uploaded {} ({}/s)", + HumanByte::from(backup_stats.size), + HumanByte::new_binary( + backup_stats.size as f64 / backup_stats.duration.as_secs_f64() + ), + ); stats.add(SyncStats { chunk_count: backup_stats.chunk_count as usize, bytes: backup_stats.size as usize, @@ -883,6 +893,13 @@ pub(crate) async fn push_snapshot( known_chunks.clone(), ) .await?; + log::info!( + "Uploaded {} ({}/s)", + HumanByte::from(sync_stats.bytes), + HumanByte::new_binary( + sync_stats.bytes as f64 / sync_stats.elapsed.as_secs_f64() + ), + ); stats.add(sync_stats); } ArchiveType::FixedIndex => { @@ -908,6 +925,13 @@ pub(crate) async fn push_snapshot( known_chunks.clone(), ) .await?; + log::info!( + "Uploaded {} ({}/s)", + HumanByte::from(sync_stats.bytes), + HumanByte::new_binary( + sync_stats.bytes as f64 / sync_stats.elapsed.as_secs_f64() + ), + ); stats.add(sync_stats); } } -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel