[pbs-devel] [PATCH pbs-docs] pxar extract: rewrite pattern matching explanation

Dylan Whyte d.whyte at proxmox.com
Thu Jul 30 16:10:16 CEST 2020


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 at 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






More information about the pbs-devel mailing list