Environment variable within repositories path no longer supported #1062
Labels
No labels
blocked
breaking
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#1062
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 local server running a Docker compose-based setup that makes use of Borgmatic to backup the various databases running on the server. Given the complexity of the set up, and to make it simpler to update the services that I'm using, I run a number of automated tests that include running all of the services as well as attempting to restore a pre-existing backup.
To make it simpler to switch from the 'real' backup location to a test one, I've set
pathof the repository to be${REMOTE_REPO}and so allowing the CI to set it to one value (a local directory) while the server sets it to another (a remote service). When upgrading fromghcr.io/borgmatic-collective/borgmatic:1.9.14toghcr.io/borgmatic-collective/borgmatic:2.0.1, the tests that were previously passing started failing.Steps to reproduce
The
config.yamllooks like this:The Docker compose file looks like this:
Actual behavior
Attempting to run a borgmatic command, such as attempting to restore a previous created backup (
docker compose run --rm borgmatic restore --archive latest), results in this error:Running
docker compose --file=compose.yaml run --rm --entrypoint env borgmaticshows the environment variables available inside the container are these (with passwords & passphrases being test data) - note theREMOTE_REPOis present:Expected behavior
Borgmatic should be able to replace the repository path with an environment variable value.
Other notes / implementation ideas
No response
borgmatic version
ghcr.io/borgmatic-collective/borgmatic:2.0.1
borgmatic installation method
Container
Borg version
Packaged in the official container image
Python version
Packaged in the official container image
Database version (if applicable)
n/a
Operating system and version
Server is Ubuntu 24.04, although the failure was spotted on a GitHub Action public runner
Thanks for filing this. This is now fixed in main (along with a new end-to-end test to catch this sort of issue) and will be part of the next release! Probably pretty soon since this is kind of an egregious bug...
Released in borgmatic 2.0.2!