patterns and patterns_from do not work with relative dirs in pattern #212
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#212
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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!