public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH v2 proxmox-backup 0/1] fix #3828: proxmox_backup_debug: Introduce `diff archive` subcommand
@ 2022-10-28 10:01 Lukas Wagner
  2022-10-28 10:01 ` [pbs-devel] [PATCH v2 proxmox-backup 1/1] " Lukas Wagner
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Wagner @ 2022-10-28 10:01 UTC (permalink / raw)
  To: pbs-devel

Note: The original patch series included a patch for pxar - since 
it has already been merged, it is not included anymore.

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.


Changes from v1: 
  - Removed now unecessary GoodbyeTable match arms since the bug in the pxar 
    has been fixed.

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      | 441 ++++++++++++++++++++++
 src/bin/proxmox_backup_debug/mod.rs       |   1 +
 4 files changed, 447 insertions(+), 1 deletion(-)
 create mode 100644 src/bin/proxmox_backup_debug/diff.rs

-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-23 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 10:01 [pbs-devel] [PATCH v2 proxmox-backup 0/1] fix #3828: proxmox_backup_debug: Introduce `diff archive` subcommand Lukas Wagner
2022-10-28 10:01 ` [pbs-devel] [PATCH v2 proxmox-backup 1/1] " Lukas Wagner
2022-11-23 10:26   ` [pbs-devel] applied: " w.bumiller
2022-11-23 15:46   ` [pbs-devel] " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal