Skip to content

Add support for --host

I'm backing up on a mac and in my experience the hostname that restic uses is not stable (https://golang.org/pkg/os/#Hostname). To avoid having backups from the same host with different hostnames, I always specify the hostname manually when backing up using the --host argument.

In order to support the host argument in rescript, the minimal change would probably be to simply add HOSTNAME to the config and always pass --host "$HOSTNAME" to restic backup.

The only issue is that I don't know if restic's hostname (go's os.Hostname()) is always equal to $HOSTNAME from the shell?

Thanks for making rescript!