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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 456448BD0E for ; Thu, 27 Oct 2022 14:28:19 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2E1B5374E4 for ; Thu, 27 Oct 2022 14:28:19 +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 for ; Thu, 27 Oct 2022 14:28:17 +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 9DF0144C3F for ; Thu, 27 Oct 2022 14:28:17 +0200 (CEST) From: Lukas Wagner To: pbs-devel@lists.proxmox.com Date: Thu, 27 Oct 2022 14:28:04 +0200 Message-Id: <20221027122806.79851-1-l.wagner@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 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox-backup-debug.rs, mod.rs, diff.rs, lib.rs, acl.rs] Subject: [pbs-devel] [PATCH-SERIES proxmox-backup/pxar] fix #3828: proxmox_backup_debug: Introduce `diff archive` subcommand 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: Thu, 27 Oct 2022 12:28:19 -0000 This patch series adds the "diff archive" subcommand to proxmox-backup-debug. It allows to compare pxar archives in two different snapshots, producing a list of added/modified/deleted directory entries. For example: $ proxmox-backup-debug diff archive root.pxar M d etc M f etc/hosts D l etc/localtime M d tmp A f tmp/newfile The first row indicates addded/modified/deleted, the second the type of directory entry (file, directory, link, FIFO, etc.). The new command accepts the --ns/--keyfile/--keyfd/--repository options in the same manner as proxmox-backup-client. A few words about the new command's performance: For large folder structures with loads of small files, for example a full container backup, the tool is pretty slow. This is due to fact that we need to skim through *a lot* of metadata to distinguish *modified* files from *potentially modified* files - the latter being files which happen to be stored in the same chunk as a modified file. However, in terms of usability it still beats manually restoring two snapshots and using some directory diff tool on the restored directories. Compatibility notes: The pxar patch is required to compile the second patch. Both patches should not affect any other users/system parts. pxar: Lukas Wagner (1): derive PartialEq trait for Metadata and related structs src/format/acl.rs | 4 ++-- src/format/mod.rs | 8 ++++---- src/lib.rs | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) proxmox-backup: Lukas Wagner (1): fix #3828: proxmox_backup_debug: Introduce `diff archive` subcommand. docs/proxmox-backup-debug/description.rst | 3 + src/bin/proxmox-backup-debug.rs | 3 +- src/bin/proxmox_backup_debug/diff.rs | 456 ++++++++++++++++++++++ src/bin/proxmox_backup_debug/mod.rs | 1 + 4 files changed, 462 insertions(+), 1 deletion(-) create mode 100644 src/bin/proxmox_backup_debug/diff.rs -- 2.30.2