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 8A6CD97F4B for ; Wed, 6 Mar 2024 15:35:00 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6B9EB1A518 for ; Wed, 6 Mar 2024 15:34:30 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 6 Mar 2024 15:34:29 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 77AB24884B for ; Wed, 6 Mar 2024 15:34:29 +0100 (CET) From: Gabriel Goller To: pbs-devel@lists.proxmox.com Date: Wed, 6 Mar 2024 15:34:10 +0100 Message-ID: <20240306143422.114335-1-g.goller@proxmox.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.096 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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] [RFC proxmox-backup 0/3] Encode creation parameters into pxar archive 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: Wed, 06 Mar 2024 14:35:00 -0000 To better debug the creation of the pxar archive, we encode the creation_params (the parameters passed to the cli) inside the pxar archive. Like this we just need to locate the `.pxar_creation_params` file in the archive and we can check which arguments have been used. To realize this, we unify all the parameters of the `create_backup` function so that we don't need an additional struct (which in turn introduces additional maintenance efforts). An example `.pxar_creation_params` file would look like this: { "backupspec": [ "test.pxar:linux" ], "chunk-size": 4096, "exclude": [ "MAINTAINERS" ], "skip-e2big-xattr": true } Some background: The original idea came from Dietmar and while it is surely useful, I don't really like my implementation (most likely this is a skill-issue from my side). So suggestions/critique of any kind is welcome! proxmox-backup: Gabriel Goller (3): pxar: factor out encode_file client: unify parameters and write to file pxar: added creation parameters pbs-client/src/pxar/create.rs | 23 ++++++- pbs-client/src/pxar_backup_stream.rs | 5 +- proxmox-backup-client/src/main.rs | 29 +++++--- .../src/proxmox_restore_daemon/api.rs | 2 +- pxar-bin/Cargo.toml | 1 + pxar-bin/src/main.rs | 67 ++++++++++++------- tests/catar.rs | 1 + 7 files changed, 89 insertions(+), 39 deletions(-) Summary over all repositories: 7 files changed, 89 insertions(+), 39 deletions(-) -- Generated by git-murpp 0.5.0