From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id F03DC1FF0AA for ; Tue, 17 Nov 2026 16:28:55 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 06FC1216FD; Tue, 17 Nov 2026 16:28:36 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 09/10] bin: debug: use pxar related archive name helpers for diff Date: Tue, 17 Nov 2026 16:28:13 +0100 Message-ID: <20261117152814.491323-10-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261117152814.491323-1-c.ebner@proxmox.com> References: <20261117152814.491323-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794929312348 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.367 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: J3WMTP5EET3UM3PR3LCHHCUTOOCSZJDE X-Message-ID-Hash: J3WMTP5EET3UM3PR3LCHHCUTOOCSZJDE X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Reuses the helpers to check for archive name extensions and archive name completions used by the client and server for keeping implementation details in sync. Also, mention mpxar/ppxar extensions being supported when bailing. Signed-off-by: Christian Ebner --- src/bin/proxmox_backup_debug/diff.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/proxmox_backup_debug/diff.rs b/src/bin/proxmox_backup_debug/diff.rs index cef4af68d..a8fe73b4f 100644 --- a/src/bin/proxmox_backup_debug/diff.rs +++ b/src/bin/proxmox_backup_debug/diff.rs @@ -20,7 +20,7 @@ use pbs_client::tools::key_source::{ get_encryption_key_password, }; use pbs_client::tools::{ - complete_archive_name, complete_group_or_snapshot, connect, extract_repository_from_value, + complete_group_or_snapshot, complete_pxar_archive_name, connect, extract_repository_from_value, get_pxar_archive_names, optional_ns_param, }; use pbs_client::{BackupReader, BackupRepository, BackupTargetArgs, RemoteChunkReader}; @@ -51,7 +51,7 @@ pub fn diff_commands() -> CommandLineInterface { .arg_param(&["prev-snapshot", "snapshot", "archive-name"]) .completion_cb("prev-snapshot", complete_group_or_snapshot) .completion_cb("snapshot", complete_group_or_snapshot) - .completion_cb("archive-name", complete_archive_name), + .completion_cb("archive-name", complete_pxar_archive_name), ); cmd_def.into() @@ -141,7 +141,7 @@ async fn diff_archive_cmd( let output_params = OutputParams { color }; - if archive_name.ends_with(".pxar.didx") { + if archive_name.has_pxar_filename_extension() { diff_archive( &prev_snapshot, &snapshot, @@ -152,7 +152,7 @@ async fn diff_archive_cmd( ) .await?; } else { - bail!("Only .pxar files are supported"); + bail!("Only .pxar, .mpxar and .ppxar files are supported"); } Ok(()) -- 2.47.3