Restic integration with pre-existing repo on Azure | NewBasicClient: azure: account name is not valid:

I am using Restic with Velero for Kubernetes backups.

velero restic repo get -o json gives:

“resticIdentifier”: “azure:velero:/restic/nginx-example”,

Though when I try to use it as a restic repo using the restic client:

restic snapshots --repo "azure:velero:/restic/nginx-example"

, I get the below message:

Fatal: unable to open repo at azure:velero:/restic/nginx-example: NewBasicClient: azure: account name is not valid: it must be between 3 and 24 characters, and only may contain numbers and lowercase letters:This text will be hidden

Can someone please advise?

Thanks
Abhinav

Have you checked that the AZURE_ACCOUNT_NAME is correct?

1 Like

Thanks a lot. I would have found it helpful if not figured the issue while going through Restic docs:

https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#microsoft-azure-blob-storage

Additionally, make sure to use the access key from Azure Storage Account section for
export AZURE_ACCOUNT_KEY=xxxx. I was using the client secret key from the service principal and it was failing on base 64 errors since it expects it to be in a base64 encoded format.