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 F3CEF674F2 for ; Thu, 30 Jul 2020 16:10:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E4CC617C88 for ; Thu, 30 Jul 2020 16:10:29 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 id B69EB17C7D for ; Thu, 30 Jul 2020 16:10:28 +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 83E9A433F6 for ; Thu, 30 Jul 2020 16:10:28 +0200 (CEST) From: Dylan Whyte To: pbs-devel@lists.proxmox.com Date: Thu, 30 Jul 2020 16:10:16 +0200 Message-Id: <20200730141016.949-1-d.whyte@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH pbs-docs] pxar extract: rewrite pattern matching explanation 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, 30 Jul 2020 14:10:30 -0000 This patch is a rewrite of the explanation of pattern matching with pxar extract. It now both reflects how the tool works and provides clearer instructions on the options available for pattern matching. Signed-off-by: Dylan Whyte --- docs/pxar/description.rst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/pxar/description.rst b/docs/pxar/description.rst index cad1a830..50bd9984 100644 --- a/docs/pxar/description.rst +++ b/docs/pxar/description.rst @@ -95,18 +95,25 @@ with the following command: If no target is provided, the content of the archive is extracted to the current working directory. -In order to restore only parts of an archive, single files and/or folders, -it is possible to pass the corresponding glob match patterns as additional -parameters or use the patterns stored in a file: +To restore only parts of an archive, single files, and/or folders, you can pass +the ``--pattern`` parameter with ``gitignore``\-style match patterns: .. code-block:: console - # pxar extract etc.pxar '**/*.conf' --target /restore/target/etc + # pxar extract etc.pxar --pattern '**/*.conf' --target /restore/target/etc The above example restores all ``.conf`` files encountered in any of the sub-folders in the archive ``etc.pxar`` to the target ``/restore/target/etc``. -A path to the file containing match patterns can be specified using the -``--files-from`` parameter. + +A path to a file containing match patterns can also be specified, using the +``--files-from`` parameter: + +.. code-block:: console + + # pxar extract archive.pxar --files-from ./match-patterns --target target + +This example will restore all files that match one of the patterns found in the file +``match-patterns``. Note that the name and location of this file are arbitrary. List the Contents of an Archive ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- 2.20.1