#22074·restic

[Bug] restic cat config on Azure Storage Account with a missing Container takes 15 mins to fail

Author: justenwalkerCreated Sep 24, 2026Updated Sep 24, 2026

Output of restic version

restic 0.19.1 compiled with go1.26.4 on darwin/arm64

What backend/service did you use to store the repository?

Azure Blob Storage, authenticated with AZURE_ACCOUNT_NAME and AZURE_ACCOUNT_KEY.

Problem description / Steps to reproduce

Any command that opens an existing repository blocks for 15 minutes when the Azure container does not exist, then fails. restic init against the same location creates the container right away.

  1. Pick a storage account and a container name that does not exist in it.

  2. Run a command that opens the repository:

    bash
    export AZURE_ACCOUNT_NAME=<account>
    export AZURE_ACCOUNT_KEY=<key>
    export RESTIC_PASSWORD=<password>
    restic -r azure:does-not-exist:/repo cat config
  3. restic retries for 15 minutes before it exits.

For comparison, a missing config blob in a container that does exist fails at once with repository does not exist.

Expected behavior

A missing container fails immediately, the same as a missing config file:

txt
Fatal: repository does not exist: unable to open config file: ...
Is there a repository at the following location?

Actual behavior

restic retries the Stat of the config file until the 15-minute retry limit runs out:

Stat(<config/>) returned error, retrying after 1.106390407s: blob.GetProperties: HEAD https://<account>.blob.core.windows.net/does-not-exist/repo%2Fconfig
--------------------------------------------------------------------------------
RESPONSE 404: 404 The specified container does not exist.
ERROR CODE: ContainerNotFound
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------
Stat(<config/>) returned error, retrying after 1.377195697s: blob.GetProperties: HEAD https://<account>.blob.core.windows.net/does-not-exist/repo%2Fconfig
--------------------------------------------------------------------------------
RESPONSE 404: 404 The specified container does not exist.
ERROR CODE: ContainerNotFound
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------

...
repeated for 15mins
...


Fatal: unable to open config file: blob.GetProperties: HEAD https://<account>.blob.core.windows.net/does-not-exist/repo%2Fconfig
--------------------------------------------------------------------------------
RESPONSE 404: 404 The specified container does not exist.
ERROR CODE: ContainerNotFound
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------

azure:does-not-exist:/repo

Then it exits with the generic error instead of ErrNoRepository:

Fatal: unable to open config file: ... ContainerNotFound

Do you have any idea what may have caused this?

The Azure backend classifies ContainerNotFound as neither "not exist" nor permanent, so the retry backend keeps retrying it.

My preferred fix would be to make IsNotExist also match bloberror.ContainerNotFound: A missing container means every object in it is missing, and hasRepositoryConfig then returns ErrNoRepository.

Another possibility is to add it to IsPermanentError, which stops the retries; but it keeps the generic error as the cause, and I'm pretty sure 404 was omitted from this for a reason.