patterns and patterns_from do not work with relative dirs in pattern
What I'm trying to do and why
I had own script with Borg backup using patterns file - that worked. Now migrated to borgmatic and all the patterns are ignored.
Steps to reproduce (if a bug)
Create config.yaml with:
location: patterns_from: - /etc/borgmatic/default.patterns
$ cat /etc/borgmatic/default.patterns P sh R / - lv_data
Actual behavior (if a bug)
The path /lv_data is backed up.
Expected behavior (if a bug)
The path /lv_data is excluded from backup.
Other notes / implementation ideas
borg help patterns:
... When you give /absolute/ as root, they will look like /absolute/…/file.ext. This is meant when we talk about “full path” below.
R / and
- lv_data should result to
borgmatic version: 1.3.13-1
borgmatic installation method: AUR Arch package
Borg version: 1.1.10-1
Python version: 3.7.4
operating system and version: Arch Linux x86_64, up-to-date
Would it be possible to run borgmatic with
--verbosity 2 so we can see the exact flags that borgmatic passes to Borg? That would help me narrow down the problem. Thanks!
Note that borgmatic doesn't do any pre-processing of the patterns files.. It should just be passing the filenames through directly to Borg.
Hm. My mistake. In my original scripts, I probably used relative path for backup, like
cd / borg create --patterns-from /some/patters repo::archive .
Which then requires patterns like
However, when using:
borg create --patterns-from /some/patters repo::archive /
Then the patterns must be like
The Borg docs do say that, however in a not so well comprehensible way...
P.S. I noted some other bug with borgmatic and will report it separately.
Deleting a branch is permanent. It CANNOT be undone. Continue?