From: "Shan Shaji" <s.shaji@proxmox.com>
To: "Thomas Ellmenreich" <t.ellmenreich@proxmox.com>,
<pbs-devel@lists.proxmox.com>
Subject: Re: [PATCH proxmox-backup 5/6] fix #7024: cli: add more information inside the backup progress logs
Date: Wed, 15 Jul 2026 16:06:01 +0200 [thread overview]
Message-ID: <DJZ7AWU1V8KT.3FYAASRRDXP9A@proxmox.com> (raw)
In-Reply-To: <DJZ5M9T0HGWA.1PRIGBLPZBKZC@proxmox.com>
Hi Thomas,
Thanks for taking the time to test the changes.
On Wed Jul 15, 2026 at 2:46 PM CEST, Thomas Ellmenreich wrote:
> I tested the backup client in both `img` as well as `pxar` mode and the output
> works well. The only thing I noticed is that the progress logs during the
> backup process are now specific to the image archive type. If I have
> understood correctly this is because the callback is only created for the
> image archive type.
As discussed offlist, the callback is also getting created inside `backup_directory`
for the .pxar archive type. However, the logs for `.pxar` archive is not shown
when the change-detection-mode is legacy. Thank you for finding that. I will
check and send a v2.
> Not sure if that was intentional, or I may have missed something, but if not,
> it could be useful to note this in the commit message.
>
> This could potentially also be something that is only active if
> verbose logging is enabled.
I am not so sure about that, because earlier the logs are shown by default.
Also, IMHO it is nice to show the logs by default. But, I am happy to
change that. May be @chris or @fabian have a suggestion?
> As for the tests, I did the following, always using a older client, the new
> client and the new client with `verbose` active.
> - Image archive backup of a test node
> - File archive backup of the node's /etc directory
> - File archive backup of 25GB of random data
> - Image archive backup of the same node with the additional 25GB
> I still have all of the logs in case you want to take a look at them.
>
> On Mon Jul 13, 2026 at 10:15 AM CEST, Shan Shaji wrote:
>> previously, the progress logs only reported the processed stream size
>> and uploaded size. To improve visibility additional information from
>> `PxarArchiverProgressStats` and `UploadCounters` has been included in
>> the logs.
>>
>> To access the upload statistics, a new callback field has been added to
>> the UploadOptions struct that accepts UploadCounters and TimeSpan as
>> parameters. Additionally, to include pxar metadata in the logs, the
>> `PxarArchiverProgressStats` instance is now created earlier and shared
>> between the archiver and the progress logger callback.
>
> [snip]
>
>> diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs
>> index 34d8db90b..8ae0cffe8 100644
>> --- a/pbs-client/src/backup_writer.rs
>> +++ b/pbs-client/src/backup_writer.rs
>> @@ -874,20 +877,13 @@ impl BackupWriter {
>> let (upload_queue, upload_result) =
>> Self::append_chunk_queue(h2.clone(), wid, append_chunk_path, counters.clone());
>>
>> - let progress_handle = if archive.ends_with(".img.fidx")
>> - || archive.ends_with(".pxar.didx")
>> - || archive.ends_with(".ppxar.didx")
>> - {
>> + let progress_handle = if let Some(callback) = progress_logging_callback {
>> let counters = counters.clone();
>> Some(tokio::spawn(async move {
>> loop {
>> tokio::time::sleep(tokio::time::Duration::from_secs(60)).await;
>> -
>> - let size = HumanByte::from(counters.total_stream_len());
>> - let size_uploaded = HumanByte::from(counters.uploaded_len());
>> let elapsed = TimeSpan::from(start_time.elapsed());
>> -
>> - info!("processed {size} in {elapsed}, uploaded {size_uploaded}");
>
> The removed logging that logged for all archive types
>
>> + callback(&counters, &elapsed);
>> }
>> }))
>> } else {
>
> [snip]
>
>> diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs
>> index 5c52b7917..8ce5540d5 100644
>> --- a/proxmox-backup-client/src/main.rs
>> +++ b/proxmox-backup-client/src/main.rs
>> @@ -1268,6 +1307,12 @@ async fn create_backup(
>> (BackupSpecificationType::IMAGE, false) => {
>> log_file("image", &filename, target.as_ref());
>>
>
> Current callback (below) is only active for the Image type (as seen above).
>
>> + let progress_logger = |counters: &UploadCounters, elapsed: &TimeSpan| {
>> + let size = HumanByte::from(counters.total_stream_len());
>> + let size_uploaded = HumanByte::from(counters.uploaded_len());
>> + log::info!("processed {size} in {elapsed}, uploaded {size_uploaded}");
>> + };
>> +
>> // 0 means fifo pipe with unknown size
>> let image_file_size = (size != 0).then_some(size);
>> let upload_options = UploadOptions {
>
> [snip]
next prev parent reply other threads:[~2026-07-15 14:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 8:15 [PATCH proxmox-backup 0/6] fix #7024: add more information inside backup logs Shan Shaji
2026-07-13 8:15 ` [PATCH proxmox-backup 1/6] client: pxar: rename `ReuseStats` struct to PxarArchiverProgressStats Shan Shaji
2026-07-13 8:15 ` [PATCH proxmox-backup 2/6] client: pxar: use atomic values in `PxarArchiverProgressStats` Shan Shaji
2026-07-13 8:15 ` [PATCH proxmox-backup 3/6] fix #7024: pxar: show archiver summary for legacy and data mode Shan Shaji
2026-07-13 8:15 ` [PATCH proxmox-backup 4/6] client: backup_stats: move `uploaded_len` counter to `UploadCounters` Shan Shaji
2026-07-13 8:15 ` [PATCH proxmox-backup 5/6] fix #7024: cli: add more information inside the backup progress logs Shan Shaji
2026-07-15 12:46 ` Thomas Ellmenreich
2026-07-15 14:06 ` Shan Shaji [this message]
2026-07-13 8:15 ` [PATCH proxmox-backup 6/6] fix #7024: cli: add option to enable verbose logs Shan Shaji
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=DJZ7AWU1V8KT.3FYAASRRDXP9A@proxmox.com \
--to=s.shaji@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=t.ellmenreich@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