borgbackup / borgbackup/borg

pattern matching, docs vs. reality

Open
#7,634 5 comments 0 reactions 0 assignees View on GitHub
breaking patterns
Dominant language
Python
Stars
13.7k
Forks
875
Avg merge
11h 15m
Merged PRs (30d)
192

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.