BORG_PASSPHRASE environment variable not working as usual in 1.5.6 #330
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#330
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've noticed that since borgmatic version 1.5.6 backups won't work automatically. The problem is that even though the environment variable "BORG_PASSPHRASE" is set like "BORG_PASSPHRASE=PASSPHRASE", I get asked to enter it:
"Enter passphrase for key ssh://someserver/somearchive:". If I enter the passphrase manually the backup continues. If I install borgmatic version 1.5.5 and down, it works as expected.
Steps to reproduce (if a bug)
Load env variables and start the backup
Actual behavior (if a bug)
Expected behavior (if a bug)
Backup working automatically without having to input the passphrase.
Other notes / implementation ideas
Environment
borgmatic version: 1.5.6
borgmatic installation method: pip3 install borgmatic
Borg version: 1.1.9
Python version: 3.5.3
operating system and version: Debian Stretch 9.12 and Ubuntu 18.04
Thank you for filing this! Here's what I believe is going on: The fix for #323 changed the behavior of borgmatic passing environment variables to Borg, so that unless an option is specified in borgmatic's configuration file (like
encryption_passhprase
), its corresponding environment variable (likeBORG_PASSPHRASE
) won't get passed to Borg. The rationale is that certain options specified in one borgmatic configuration file should not still be present for subsequent configuration file invocations of Borg.But there's an unintended side-effect, which is what you're seeing here: The implicit feature of borgmatic passing through Borg-specific environment variables directly to Borg no longer works.
The good news is that there's already a pull request (#327) from another user to fix this. So hopefully it'll get solved soon! As a temporary work-around, you could use borgmatic's
encryption_passphrase
configuration file option.This is fixed in master now. I'll add a note here when the fix is released. Thanks again for the bug report!