From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 7CA7DA176 for ; Mon, 4 Apr 2022 13:45:06 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 71A8CC3E7 for ; Mon, 4 Apr 2022 13:45:06 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 758A1C3DE for ; Mon, 4 Apr 2022 13:45:05 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3DD0E44D53 for ; Mon, 4 Apr 2022 13:45:05 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Mon, 4 Apr 2022 13:45:02 +0200 Message-Id: <20220404114502.4074965-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.146 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pbs-devel] [PATCH proxmox-backup] pbs-client: print error when we couldn't download previous fidx/didx 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: , X-List-Received-Date: Mon, 04 Apr 2022 11:45:06 -0000 When we have a previous manifest, we try to download the fidx/didx files to get the known chunks list. We continue if that fails (which is ok), but we did not print any error, leading to a confusing backup output, since the users would expect that chunks will be reused. Printing the error should at least make it apparent that something did not work correctly. Signed-off-by: Dominik Csapak --- i sent it with 'eprintln' instead of the log macro, since that series was not applied yet. i'll happily resend it when thats done with the log macro, or i can send it now but i guess then hannes patches will not apply anymore since i'd have to add the log dependency myself pbs-client/src/backup_writer.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs index b02798bd..c81182a7 100644 --- a/pbs-client/src/backup_writer.rs +++ b/pbs-client/src/backup_writer.rs @@ -289,22 +289,28 @@ impl BackupWriter { // try, but ignore errors match ArchiveType::from_path(archive_name) { Ok(ArchiveType::FixedIndex) => { - let _ = self + if let Err(err) = self .download_previous_fixed_index( archive_name, &manifest, known_chunks.clone(), ) - .await; + .await + { + eprintln!("Error downloading .fidx from previous manifest: {}", err); + } } Ok(ArchiveType::DynamicIndex) => { - let _ = self + if let Err(err) = self .download_previous_dynamic_index( archive_name, &manifest, known_chunks.clone(), ) - .await; + .await + { + eprintln!("Error downloading .didx from previous manifest: {}", err); + } } _ => { /* do nothing */ } } -- 2.30.2