-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Set --host via environment variable #4733
Description
Output of restic version
restic 0.16.4 (v0.16.4-330-gd1d773cfc) compiled with go1.21.6 on linux/amd64
What should restic do differently? Which functionality do you think we should add?
A feature to allow the user to specify by environment variable the hostname for commands that acecpt the --host flag. This would allow the user to set the hostname once and not have to specify it for every command.
What are you trying to do? What problem would this solve?
I use restic in an HPC environment to back up data from a shared filesystem. Because each compute node has a unique hostname, I have been setting --host to the cluster name for every command. This is error-prone and tedious, especially when using commands that accept --host alongside commands that do not,making it easy to forget to specify the --host flag when it is required.
Currently, I am sourcing a script that sets other parameters such as RESTIC_REPOSITORY and RESTIC_PASSWORD_FILE from environment variables, so it would be convenient to be able to set the hostname in the same way.
Did restic help you today? Did it make you happy in any way?
restic has been a great tool for us to back up our research data, and it has been fairly easy to teach end users how to use it. This feature would make it even easier to use.