borgapi icon indicating copy to clipboard operation
borgapi copied to clipboard

borgapi stucks on borgbackup questions

Open OzzieIsaacs opened this issue 3 years ago • 1 comments

If you start a borgbackup commands which leads to a question, e.g. you have moved the repository. Borgapi stucks, as the questions gets never answered. Borgbackup supports environment variable to answer the questions "programmatically". https://borgbackup.readthedocs.io/en/stable/usage/general.html#environment-variables -> "Some automatic “answers” (if set, they automatically answer confirmation questions):"

Borgapi supports setting the environment variables, but I didn't find any hint in documentation to set the environment variables to avoid this situation. I can imagine 2 possible solutions:

  1. add a hint to set the environment variables to avoid the situation
  2. preferred solution: Set the variables to a "safe" default, answering no and additionally add a hint in the readme to change the answers

OzzieIsaacs avatar Jul 04 '22 07:07 OzzieIsaacs

  1. preferred solution: Set the variables to a "safe" default, answering no and additionally add a hint in the readme to change the answers

I agree with this solution, check to see if those variables have been set already and if not setting them to NO would be a good solution.

I think allowing those to be set during creation of the API instead of requiring the user to call set_environ() would be a good idea too.

spslater avatar Mar 13 '23 17:03 spslater