Feature request: support the BORG_REPO environment variable #391
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#391
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
My configuration files are meant to be open and public. This is why I tend to remove every private information from these files using environment variables. Currently, the Borgmatic configuration file has one last public information: repositories.
I see that https://projects.torsion.org/witten/borgmatic/src/branch/master/borgmatic/borg/environment.py#L3-L12 supports SSH custom command and the BORG_PASSPHRASE variable which I uses.
Would you accept a patch adding the
BORG_REPO
variable?Environment
borgmatic version: 1.5.12
borgmatic installation method: AUR
Borg version: 1.1.14
operating system and version: Archlinux
Sidenote: Is there a way to specify ssh commands per repository?
Sorry for the lengthy delay here, and thanks for filing this ticket. I'm not sure it makes sense to add
BORG_REPO
though for a couple of reasons:repositories
is a list! So it'd probably have to be BORG_REPOS and somehow encode a sequence of repositories. This is one reason that borgmatic uses a YAML configuration file with a variety of complex types; it would be difficult (although not impossible) to stuff everything into environment variables.Having said all that, I do recognize your ask and the underlying need there. So how about this: Have you considered borgmatic's command-line configuration option override support? This would allow you to override the configured repositories whenever you invoke borgmatic on the command-line.
The only way to do that currently would be to create separate borgmatic configuration files, one per repository. Then you could use independent options like
ssh_command
for each repository.I'm closing this due to inactivity, but please feel free to post any follow-ups here. Thanks!