trouble with exclude_patterns #1021
Labels
No labels
blocked
breaking
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#1021
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Hi
I'm having trouble with exclude_patterns, all of the excludes are being included in the backups. It used to work for me, I last made a backup a couple of borgmatic versions ago (just before .local/state was introduced). I have made a small change so don't know if its a change I made or a borgmatic change.
My exclude patters are :
exclude_patterns:
- ~/.config/borg
- ~/.local/state
- ~/.cache
- ~/.var/app//cache
- ~/.local/share/Trash
- ~/**/.dtrash
- ~/.mozilla/firefox//storage
- ~/.var/app//.mozilla/firefox//storage
- ~/.thunderbird//storage
- ~/.var/app//.thunderbird//storage
- ~/.thunderbird//ImapMail
- ~/.var/app//.thunderbird//ImapMail
I tried to change the firefox and thunderbird entries (see below) and that is when the problems started. I changed them back and the trouble continues.
Is there something I can do to fix/correct this?
My guess is that support for
~in exclude patterns was inadvertently broken by borgmatic 1.9.6—and initial testing seems to support that theory. You can verify this on your system by running borgmatic with--filesand observing whether your expected files to exclude are actually excluded. And then if you change~to your actual home directory in theexclude_patterns, seeing whether that appears to fix the excluded files in--filesoutput. ("x" indicates it's actually excluded.)Great thanks, I'll try that out. Can I use $HOME in exchange for ~ as the home directory in the config files?
You should be able to use
${HOME}for that, although this should hopefully be fixed soon and then you can continue using~.This is fixed in main and will be part of the next release. Thanks for taking the time to report this!
Released in borgmatic 1.9.14!
Thank you, that was quick.
You were right, when I replaced ~ with ${HOME} (in a test config file) and it worked. I can revert to using ~ and my original config file.