How do I download an entire container from Azure storage with azure-cli?

Solution 1:

First, login with:

az login

Then download the files you need:

az storage blob download-batch -d . \
  --pattern *.* \
  -s MyContainer \
  --account-name storageAccountName
  --account-key storageAccountKey

Solution 2:

They added download-batch option. This is exactly what you need. See https://docs.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-download-batch