Closed shiftZZnet closed 8 months ago
Fixed in 1.5.0 / 4efcaba7c5aa4969b71d7ca6cf77c072d0587329
Dear @ngosang,
thanks a lot for the try to fix the issue, but the usage of RESTIC_REPO_PASSWORD_FILE
is still mandatory.
My goal/idea was: If I already have an environment file containing the following entries:
export RESTIC_PASSWORD=<password>
export RESTIC_REPOSITORY=<repository>
I exptected that restic-exporter
is using these environment values. But you are still referring to a password file in restic-exporter.py
like this:
restic_repo_password_file = os.environ.get("RESTIC_PASSWORD_FILE")
if restic_repo_password_file is None:
restic_repo_password_file = os.environ.get("RESTIC_REPO_PASSWORD_FILE")
if restic_repo_password_file is not None:
logging.warning(
"The environment variable RESTIC_REPO_PASSWORD_FILE is deprecated, "
"please use RESTIC_PASSWORD_FILE instead."
)
if restic_repo_password_file is None:
logging.error("The environment variable RESTIC_PASSWORD_FILE is mandatory")
sys.exit(1)
You are not using the variable RESTIC_PASSWORD
in your python script.
The reason for it is that I don't want to have a second place, i.e an additonal RESTIC_PASSWORD_FILE
. I already have a configuration file for my backup and restic-exporter.py
should be able either to read from a password file or read the password from the environment.
I hope it's clearer now.
Thanks in advanve for reading and have a nice day!
Dear contributors,
you are mentioning the following in the configuration section for restic-exporter:
I want to reuse my restic configuration file so I wrote a startup wrapper for restic-exporter sourcing the configuration and setting the value for
RESTIC_REPO_PASSWORD
like this:Unfortunately restic-exporter does not startup when executing the python file:
The code block in restic-exporter.py looks like this:
Could anybody fix this issue perhaps? I don't want to use a separate password file for this.
Many thanks in advance! Joachim.