* [pbs-devel] [PATCH pbs-docs] pxar extract: rewrite pattern matching explanation
@ 2020-07-30 14:10 Dylan Whyte
0 siblings, 0 replies; only message in thread
From: Dylan Whyte @ 2020-07-30 14:10 UTC (permalink / raw)
To: pbs-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-30 14:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 14:10 [pbs-devel] [PATCH pbs-docs] pxar extract: rewrite pattern matching explanation Dylan Whyte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox