Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/usage/extract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 C files
$ borg extract my-files 'sh:home/USERNAME/src/*.c'

# 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

12 changes: 8 additions & 4 deletions src/borg/archiver/extract_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,15 @@ def build_parser_extract(self, subparsers, common_parser, mid_common_parser):

extract_epilog = process_epilog(
"""
This command extracts the contents of an archive. By default, the entire
archive is extracted, but a subset of files and directories can be selected
by passing a list of ``PATH`` arguments. The file selection can be further
restricted by using the ``--exclude`` option.
This command extracts the contents of an archive.

By default, the entire archive is extracted, but a subset of files and directories
can be selected by passing a list of ``PATH`` arguments. 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.

The file selection can be further restricted by using the ``--exclude`` option.
For more help on include/exclude patterns, see the :ref:`borg_patterns` command output.

By using ``--dry-run``, you can do all extraction steps except actually writing the
Expand Down
Loading