diff --git a/docs/usage/extract.rst b/docs/usage/extract.rst index 95703eaf0f..803ef9bedf 100644 --- a/docs/usage/extract.rst +++ b/docs/usage/extract.rst @@ -19,6 +19,9 @@ Examples # Extract the "src" directory but exclude object files $ borg extract my-files home/USERNAME/src --exclude '*.o' + # Extract only the object files + $ borg extract my-files 'sh:home/USERNAME/src/*.o' + # Restore a raw device (must not be active/in use/mounted at that time) $ borg extract --stdout my-sdx | dd of=/dev/sdx bs=10M diff --git a/src/borg/archiver/extract_cmd.py b/src/borg/archiver/extract_cmd.py index af22fc5689..ea030d598c 100644 --- a/src/borg/archiver/extract_cmd.py +++ b/src/borg/archiver/extract_cmd.py @@ -130,6 +130,10 @@ def build_parser_extract(self, subparsers, common_parser, mid_common_parser): When parent directories are not extracted (because of using file/directory selection or any other reason), borg can not restore parent directories' metadata, e.g. owner, group, permission, etc. + + The default interpretation for the paths to extract is `pp:` which is a literal + path-prefix match. If you want to use e.g. a wildcard, you must select a different + pattern style such as `sh:` or `fm:`. See :ref:`borg_patterns` for more information. """ ) subparser = subparsers.add_parser(