Skip to content

pattern matching, docs vs. reality #7634

Description

@ThomasWaldmann

While dealing with #7631, we noted that this patterns file does not work as I expected:

P sh
R /Users/tw/w/borg
+ Users/tw/w/borg/src
+ Users/tw/w/borg/src/borg
+ Users/tw/w/borg/src/borg/helpers
+ Users/tw/w/borg/src/borg/helpers/**
- **

The idea was to include the parent dir fs items (only the 3 directory items src, borg and helpers, not the files inside), then include the desired files (here: all inside helpers) and exclude everything else.

Issue: It included all below Users/tw/w/borg/src into the backup archive (not just the dir items and the files in helpers).

So it seems not to work as I thought it would (I personally do my backups the other way: include all, only exclude what I do not want).

Update:

This is already enough to get that behaviour:

P sh
R /Users/tw/w/borg
+ Users/tw/w/borg/src
- **

Reproduced with borg 1.2.3, 1.2.4 and 1.2-maint git branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingpatternspattern matching, include, exclude, ...

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions