ansible-role-borgbackup icon indicating copy to clipboard operation
ansible-role-borgbackup copied to clipboard

location.exclude_patterns': None is not of type 'array'

Open stroobl opened this issue 4 years ago • 3 comments

It looks like something has changed in recent borgmatic versions. If I reinstall borgmatic after a dist-upgrade I now get:

/etc/borgmatic/config.yaml /etc/borgmatic.d /root/.config/borgmatic/config.yaml /root/.config/borgmatic.d: No valid configuration files found

summary:
/etc/borgmatic/config.yaml: Error parsing configuration file
An error occurred while parsing a configuration file at /etc/borgmatic/config.yaml:
At 'location.exclude_patterns': None is not of type 'array'
At 'location.exclude_from': None is not of type 'array'

I did a quick test and setting both parameters to an empty array fixes the issue. I'll try to send a fix PR later.

stroobl avatar Oct 06 '21 06:10 stroobl

Thanks, that's great!

m3nu avatar Oct 06 '21 13:10 m3nu

Is this still an issue? Sounds a bit like #88.

I also checked our template and it shouldn't add an empty exclude_from if nothing is specified. So not sure how this would end up emtpy.

m3nu avatar Jan 07 '22 10:01 m3nu

@m3nu The problem is exactly the fact that no empty array [] is configured when nothing is defined. I've been testing a few things, but forgot about this. I'll open a PR with a proposal for a fix.

stroobl avatar Jan 16 '22 16:01 stroobl