[pbs-devel] [PATCH v9 proxmox-backup 35/58] client: backup writer: make backup info output more concise

Christian Ebner c.ebner at proxmox.com
Wed Jun 5 12:53:53 CEST 2024


With the additional output in case of split pxar archives, the upload
statistics logged by the backup writer following a backup are crowded
and hard to read.

Make the output more concise by merging the currenlty 2 lines per
upload stream, shown as e.g.:

```
data.ppxar: had to backup 4 MiB of 10.943 GiB (compressed 159 B) in 49.30s
data.ppxar: average backup speed: 83.09 KiB/s
```

into a single line, shown as e.g.:

```
data.ppxar: had to back up 4 MiB of 10.943 GiB (159 B compressed) in 49.30 s (average 83.09 KiB/s)
```

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 8:
- not present in previous version

 pbs-client/src/backup_writer.rs | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs
index c22978096..813c8d602 100644
--- a/pbs-client/src/backup_writer.rs
+++ b/pbs-client/src/backup_writer.rs
@@ -371,14 +371,9 @@ impl BackupWriter {
             let size_dirty: HumanByte = size_dirty.into();
             let size_compressed: HumanByte = upload_stats.size_compressed.into();
             log::info!(
-                "{}: had to backup {} of {} (compressed {}) in {:.2}s",
-                archive,
-                size_dirty,
-                size,
-                size_compressed,
+                "{archive}: had to backup {size_dirty} of {size} (compressed {size_compressed}) in {:.2} s (average {speed}/s)",
                 upload_stats.duration.as_secs_f64()
             );
-            log::info!("{}: average backup speed: {}/s", archive, speed);
         } else {
             log::info!("Uploaded backup catalog ({})", size);
         }
-- 
2.39.2





More information about the pbs-devel mailing list