From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH-SERIES proxmox-backup/pxar] fix #3828: proxmox_backup_debug: Introduce `diff archive` subcommand
Date: Thu, 27 Oct 2022 14:28:04 +0200 [thread overview]
Message-ID: <20221027122806.79851-1-l.wagner@proxmox.com> (raw)
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 <snapshot-a> <snapshot-b> 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
next reply other threads:[~2022-10-27 12:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 12:28 Lukas Wagner [this message]
2022-10-27 12:28 ` [pbs-devel] [PATCH pxar 1/1] derive PartialEq trait for Metadata and related structs Lukas Wagner
2022-10-27 13:38 ` [pbs-devel] applied: " Wolfgang Bumiller
2022-10-27 12:28 ` [pbs-devel] [PATCH proxmox-backup 1/1] fix #3828: proxmox_backup_debug: Introduce `diff archive` subcommand Lukas Wagner
2022-10-27 13:39 ` Wolfgang Bumiller
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=20221027122806.79851-1-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-devel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal