Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract: document lack of wildcard support in default pattern style #8590

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 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)
Comment on lines +22 to 25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to add an example, but please use something more familiar to users (.pdf rather than .o). Not everybody is a developer.

$ borg extract --stdout my-sdx | dd of=/dev/sdx bs=10M

4 changes: 4 additions & 0 deletions src/borg/archiver/extract_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +134 to +136
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATHs is already explained in 113. Please rephrase and move this there.

"""
)
subparser = subparsers.add_parser(
Expand Down