config file validation fails #698
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#698
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
Setup initial config file
Steps to reproduce (if a bug)
Actual behavior (if a bug)
validate-borgmatic-config
/etc/borgmatic/config.yaml: Error parsing configuration file
An error occurred while parsing a configuration file at /etc/borgmatic/config.yaml:
At 'location': Additional properties are not allowed ('archive_name_format' was unexpected)
At 'location.repositories[0]': {'path': '/srv/mergerfs/JGPool/BorgRepo', 'label': 'borgbase'} is not of type 'string'
Expected behavior (if a bug)
verify config file
Other notes / implementation ideas
borgmatic version: [version here]
1.7.4
borgmatic installation method: [e.g., Debian package, Docker container, etc.]
Debian
Borg version: [version here]
1.2.3.
One of the errors that says
is because of your Borgmatic version.
Labels for repos were introduced in version 1.7.10 (ref: https://projects.torsion.org/borgmatic-collective/borgmatic/src/branch/main/NEWS).
For earlier versions it used to be just a list of repo urls.
OK. thanks.
I removed the label and removed the 'path:' signifier to accomodate the old version. Same problem, different error message:
root@raspberrypi:/etc/borgmatic# validate-borgmatic-config
/etc/borgmatic/config.yaml: Error parsing configuration file
An error occurred while parsing a configuration file at /etc/borgmatic/config.yaml:
At 'location': Additional properties are not allowed ('archive_name_format' was unexpected)
Can you share your complete config? Looks like 'archive_name_format' is uncommented while it's parent key (storage) is commented.
I found my error.
Further down in the file I was defining archive-name but had 'storage:' commented out. My bad.
thanks for your help.
If I may recommend one feature then remove the hierarchical structure in the config file.
Just parameters would be much much easier to manage.
or alternativelly
keep the hierarchy and comment all top level section headers out by default, and just allow empty sections (if no parameters used)
I'm glad to hear you got it sorted out, and thanks for the recommendation. I've considered removing the section headings as you suggest, but there are other parts of the configuration file that benefit from the hierarchy. Maybe it would make sense to remove the top-level hierarchy while leaving the other parts.