After reading the documentation, I set these environment variables for backing up to azure blob storage.
AZURE_ACCOUNT_NAME=<account>.blob.core.usgovcloudapi.net
AZURE_ACCOUNT_KEY=<long secret>
But this configuration always throws the below error for me:
restic init -v -r azure:backups:/
enter password for new repository:
enter password again:
Fatal: create repository at azure:backups:/ failed: open: NewBasicClient: azure: account name is not valid: it must be between 3 and 24 characters, and only may contain numbers and lowercase letters: <account>.blob.core.usgovcloudapi.net
The FQDN is too long for that variable. I can set it without the domain name, but now it tries to connect to blob.core.windows.net which is the wrong domain and fails with a gateway error:
restic init -v -r azure:backups:/
enter password for new repository:
enter password again:
Fatal: create repository at azure:backups:/ failed: container.CreateIfNotExists: Put “https://<account>.blob.core.windows.net/backups?restype=container”: Bad Gateway
How can I get restic to connect to blob.core.usgovcloudapi.net?