Using constants in a config for placeholders in an included file. #788
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#788
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
I have a common yaml file that is imported by all of my backup configs.
This contains all my common settings (like upload limit, retention, repo passphrase and locations).
In the actual config, I'm importing this then defining the specifics (where this application lives for example).
I also had the healthchecks url and archive format in here - but I want to move to using a constant to "generate" these two values, as this will lighten this file a bit (and also mitigate copy-paste fails when creating a new config).
Steps to reproduce
This is an example common.yaml file
Inside each config, I set the
prefix
constant.I thought this should work, but it looks like
prefix
isn't being recognised as a valid placeholder.Actual behavior
When the backups run, I get the following message;
Expected behavior
The
prefix
constant should resolve.Other notes / implementation ideas
No response
borgmatic version
1.8.4
borgmatic installation method
docker
Borg version
1.2.6
Python version
3.11.5
Database version (if applicable)
N/A
Operating system and version
Alpine docker image, on an unraid server
In case
prefix
was a reserved one, I tried renaming it toslug
and got the same result.Thanks for filing this. Unfortunately this is a documented limitation of constants currently:
I do think your use case is a valuable one, and so it's worth revising the feature to work across includes. There is already a ticket covering this work: #745. So I encourage you to follow along there. Thanks again for taking the time to write up a ticket on this! It helps me understand what pain points folks are hitting with borgmatic.