From: Dylan Whyte <d.whyte@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH pbs-docs] pxar extract: rewrite pattern matching explanation
Date: Thu, 30 Jul 2020 16:10:16 +0200 [thread overview]
Message-ID: <20200730141016.949-1-d.whyte@proxmox.com> (raw)
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 <d.whyte@proxmox.com>
---
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
reply other threads:[~2020-07-30 14:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200730141016.949-1-d.whyte@proxmox.com \
--to=d.whyte@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox