$ 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
As per 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.
Hence R / and - lv_data should result to - /lv_data.
Environment
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
#### 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
```
and
```
$ 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
As per `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.*
Hence `R /` and `- lv_data` should result to `- /lv_data`.
#### Environment
**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.
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 ! home/johny
However, when using:
borg create --patterns-from /some/patters repo::archive /
Then the patterns must be like ! /home/johny.
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.
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 `! home/johny`
However, when using:
```
borg create --patterns-from /some/patters repo::archive /
```
Then the patterns must be like `! /home/johny`.
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.
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:
and
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
As per
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.
Hence
R /
and- lv_data
should result to- /lv_data
.Environment
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
Which then requires patterns like
! home/johny
However, when using:
Then the patterns must be like
! /home/johny
.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.
Glad to hear this one is cleared up!