Traceback when adding Repository to config file #794
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#794
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
When adding a repository to my config file, running
borgmatic config validate
to check results in a Python traceback.The validate command worked perfectly when I used the example generated config and edited its paths directly, but the issue started when I tried to add a second repository. While attempting to locate the cause of the issue, I must have messed with the example config layout, as now the repository line will cause a traceback no matter what.
Removing the repository entries entirely results in the validate passing (Whilst warning that a repository hasn't been provided, of course).
As far as I can tell, my config file is formatted correctly. I've even directly pasted in the values from the example config hosted online, but still get a traceback.
Could my text editor be messing with the spacing or something somehow?
Steps to reproduce
Use attached config file with Borgmatic.
borgmatic config validate
will result in a traceback.Remove repository entries.
Config will validate successfully.
Actual behavior
No response
Expected behavior
No response
Other notes / implementation ideas
No response
borgmatic version
1.8.5
borgmatic installation method
Docker
Borg version
1.2.6
Python version
3.11.5
Database version (if applicable)
No response
Operating system and version
Host: Debian Container: Alpine
What's going on is that borgmatic is interpreting the
- .nobackup
list item as part of the repositories list since it's not commented out—resulting in the traceback you're seeing. The work-around is to comment out that line so that it isn't treated as a repository.I'm going to mark this as a bug though because an invalid configuration file shouldn't result in a borgmatic traceback.
Argh, I expected it'd be something silly with the formatting. I must have forgotten to uncomment the rest of the nobackup section when setting up. Cheers.
Fixed in main!
Released in borgmatic 1.8.6!