Excludes are ignored since 1.9.6 #971
Reference in New Issue
Block a user
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?
What I'm trying to do and why
I'm using a list of excludes outside the borgmatic config with the
exclude_fromkey.Steps to reproduce
I've created a simplified environment for reproduction. The file structure in the source directory to be backed up looks like this:
My config.yaml looks like this
And the exclude file at /home/user/borgmatic-bug/excludes looks like this:
Actual behavior
When creating an archive with borgmatic 1.9.5, everything works as expected: file1.txt in the included directory is included in the backup, file2.txt in the excluded directory isn't. With borgmatic 1.9.6, both files are included in the backup.
Expected behavior
The same behavior as with borgmatic 1.9.5.
Other notes / implementation ideas
No response
borgmatic version
1.9.6
borgmatic installation method
Arch Linux Package
Borg version
borg 1.4.0
Python version
Python 3.13.1
Database version (if applicable)
No response
Operating system and version
Arch Linux
Can I see the full output of your
borgmatic createrun with--verbosity 2 --filesadded? Feel free to redact as necessary. I'm most interested in output starting withWriting patterns to ...and the following lines all the way up to and including the logged Borg command. The files listing introduced by--fileswould be handy too. Thanks.Thanks for the quick reply @witten!
Sure. Here is the output when creating a backup from the reproduction environment I've mentioned above. Unfortunately I can not create the same from my production environment, as that would try to upload ~1TB of data to borgbase, which would take several hours and exceed my quota.
This is the command I executed:
BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=y borgmatic create --verbosity 2 --files -c ./config.yamlAnd here is the output:
Really odd. It does appear that your excludes are not making their way into the patterns passed to Borg. Can I get a copy of your repro config file as well, so I can try to get a repro here as well? Feel free to either attach the file or paste its contents, whatever's easier. Thank you!
Ugh, I think I found the problem. I'm embarassed to say it's a typo in both the code and the tests.. It's looking for
excludes_fromrather thanexclude_from, which is what the option is actually called in config. Therefore the excludes aren't getting consumed at all. Unfortunately you won't be able to rename your config option, as onlyexclude_fromis valid in config.(I guess I don't need to see your config after all!)
As a temporary workaround, you could inline your excludes and use
exclude_patternsinstead ofexclude_from. Or you could just use borgmatic 1.9.5 until this is fixed. I might do a quick release on this though since it's such an egregious regression.Sure, here is the config file
Well, glad to hear you found it 🙂 I'll stick with borgmatic 1.9.5 for now, thank you!
Oh, I didn't realize that was the entire config. Thanks! In any case, I think I have a fix in hand.
This is fixed in main and will be part of the next release. Thanks!
Released in borgmatic 1.9.7!