From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 17D811FF3AE for ; Thu, 13 Jun 2024 14:58:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DC889310F0; Thu, 13 Jun 2024 14:58:39 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Thu, 13 Jun 2024 14:58:14 +0200 Message-Id: <20240613125818.373286-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.026 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] [PATCH v4 proxmox-backup 0/4] fix #2996: client: allow optional match patterns for restore 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: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" This patches implement the api types to allow input validation for pathpatterns and reuse them in the pxar-bin, the catalog shell as well as the newly exposed optional restore patterns to the backup clients restore command. Patterns are parsed and passed along to the preexisting restore logic via the `PxarExtractOptions`. changes since version 3: - s/matches/patterns for bail message, thanks for testing and catching this Gabriel! changes since version 2: - added API types as suggested - reuse same API types for proxmox-backup-client catalog shell and restore as well as the pxar extract - use simple reference instead of `as_slice()` when passing vector of patterns Link to bugtracker issue: https://bugzilla.proxmox.com/show_bug.cgi?id=2996 proxmox-backup: Christian Ebner (4): api-types: implement dedicated api type for match patterns pxar: bin: use dedicated api type for restore pattern client: catalog shell: use dedicated api type for patterns fix #2996: client: allow optional match patterns for restore pbs-api-types/src/lib.rs | 3 ++ pbs-api-types/src/pathpatterns.rs | 55 +++++++++++++++++++++++++++++++ pbs-client/src/catalog_shell.rs | 7 ++-- proxmox-backup-client/src/main.rs | 27 ++++++++++++--- pxar-bin/Cargo.toml | 1 + pxar-bin/src/main.rs | 10 ++---- 6 files changed, 88 insertions(+), 15 deletions(-) create mode 100644 pbs-api-types/src/pathpatterns.rs -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel