configuration override not working for "required" fields
Closedopened 5 months ago by simon-77 · 4 comments
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
What I'm trying to do and why
I try to use the include merging of configuration files described here:
If I try to include a "required" element without overriding it, the parser gives an error:
For example, the
location.repositoriesis described only in an included configuration. When issuing
sudo borgmatic createthe following error appears:
With "required" element I mean any field in the configuration file that is descibed with
location.repository; or for prune command any element of
Steps to reproduce
Create two files:
and create a repo:
Result: archive named "include-success..." created. Therefore the include works fine
Now change the files:
and execute the
Result: the error included in the top of this post.
--verbosity 2output is:
A repository created like in the first step
Other notes / implementation ideas
If I (additionally) override it at in the command, it work's again:
sudo borgmatic create --override location.repositories='[/path/to/test/repo]'
borgmatic version: 1.5.24
borgmatic installation method: openSUSE package manger
Borg version: 1.2.2
Python version: 3.10.7
operating system and version:
Operating System: openSUSE Tumbleweed 20221026
Kernel Version: 6.0.3-1-default (64-bit)
configuration override not working for "required" fields - Include mergingto configuration override not working for "required" fields 5 months ago
Thanks for the detailed ticket! I think the problem is that the version of borgmatic you're using is too old to support "deep merging". Without this feature, you can't merge one
location:section that contains
source_directorieswith another that contains
repositories. In the older version of borgmatic you're using, if you try to do that, then only one of the
location:sections "wins"—the one that's not included.
So as I see it, here are your options:
source_directories(and all other
location:options) all in one configuration file, whether included or not.
Thank you for the quick response.
I saw the version note about the deep merge in the section below.
But the section "Include Merging" has already an example about the "YAML merge of included configurations" and an override example. Only the next section "Deep merge" has the version note. I assumed this "Deep merge" is regarding: "Colliding list values are appended together."
Nevertheless, if it is really fixed in v 1.6 I'm glad anyways :)
Do you have any clue when this version will come to openSUSE software repository? The openSUSE tumbleweed is usually only a few weeks behind the releases. Having an 8 month old (v1.5.2) software version looks strange.
You are of course correct that the "Include Merging" section shows an example that only works with deep merge and borgmatic 1.6.0+—without any indication of that fact! I'll update the example accordingly. I appreciate you pointing this out.
I don't unfortunately have insight into the openSUSE packaging timeline for borgmatic. That entirely a third-party process. I'd recommend contacting the packager or trying one of the other borgmatic installation methods. (I realize that's less convenient than a distro-specific package.)
Thank you, I have now installed it via pip3 and everything works fine now :)