Add passcommand for database dumps #795

Open
opened 2023-11-24 20:16:08 +00:00 by Martin · 3 comments

What I'd like to do and why

A passcommand in addition to password for database dumps would be nice for those who cannot login without password nor like to have the password in config.yaml.

Other notes / implementation ideas

No response

### What I'd like to do and why A `passcommand` in addition to `password` for database dumps would be nice for those who cannot login without password nor like to have the password in `config.yaml`. ### Other notes / implementation ideas _No response_
witten added the
good first issue
label 2023-11-24 21:17:27 +00:00
Owner

Thanks for taking the time to file this! Maybe there could be a new option in each database configuration that allows the user to specify the passcommand for that database instead of a password. And if specified, borgmatic would call out to that command, consuming its stdout (stripped of newlines) to get the password to use.

In the meantime though, these docs may be helpful: https://torsion.org/borgmatic/docs/how-to/provide-your-passwords/

Thanks for taking the time to file this! Maybe there could be a new option in each database configuration that allows the user to specify the passcommand for that database instead of a password. And if specified, borgmatic would call out to that command, consuming its stdout (stripped of newlines) to get the password to use. In the meantime though, these docs may be helpful: https://torsion.org/borgmatic/docs/how-to/provide-your-passwords/
Contributor

But borgmatic can already do that right? Afaik it should support reading things from the env so why add a feature to do that manually for one field? Is there any limitation to running your password script before calling borgmatic, saving the output in the env and calling borgmatic after that?

But borgmatic can already do that right? Afaik it should support reading things from the env so why add a feature to do that manually for one field? Is there any limitation to running your password script before calling borgmatic, saving the output in the env and calling borgmatic after that?
Owner

If there's one common theme in borgmatic feature requests, it's that users want to do more and more directly from the configuration file rather than having to rely on external shell scripting. Having said that, the work-around you describe is a totally viable option for certain users.

If there's one common theme in borgmatic feature requests, it's that users want to do more and more directly from the configuration file rather than having to rely on external shell scripting. Having said that, the work-around you describe is a totally viable option for certain users.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#795
No description provided.