az storage azcopy blob
Note
This reference is part of the storage-preview extension for the Azure CLI (version 2.61.0 or higher). The extension will automatically install the first time you run an az storage azcopy blob command. Learn more about extensions.
Manage object storage for unstructured data (blobs) using AzCopy.
Name | Description | Type | Status |
---|---|---|---|
az storage azcopy blob delete |
Delete blobs from a storage blob container using AzCopy. |
Extension | GA |
az storage azcopy blob download |
Download blobs from a storage blob container using AzCopy. |
Extension | GA |
az storage azcopy blob sync |
Sync blobs recursively to a storage blob container using AzCopy. |
Extension | GA |
az storage azcopy blob upload |
Upload blobs to a storage blob container using AzCopy. |
Extension | GA |
Delete blobs from a storage blob container using AzCopy.
az storage azcopy blob delete --container
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--connection-string]
[--recursive]
[--sas-token]
[--target]
Delete a single blob from a container.
az storage azcopy blob delete -c MyContainer --account-name MyStorageAccount -t TargetBlob
Delete all blobs from a container.
az storage azcopy blob delete -c MyContainer --account-name MyStorageAccount --recursive
Delete all blobs in a virtual directory.
az storage azcopy blob delete -c MyContainer --account-name MyStorageAccount -t "path/to/virtual_directory" --recursive
The delete target container.
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Recursively delete blobs.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The delete target path.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Download blobs from a storage blob container using AzCopy.
az storage azcopy blob download --container
--destination
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--connection-string]
[--recursive]
[--sas-token]
[--source]
Download a single blob from a container.
az storage azcopy blob download -c MyContainer --account-name MyStorageAccount -s "path/to/blob" -d "path/to/file"
Download a virtual directory from a container.
az storage azcopy blob download -c MyContainer --account-name MyStorageAccount -s "path/to/virtual_directory" -d "download/path" --recursive
Download the contents of a container onto a local file system.
az storage azcopy blob download -c MyContainer --account-name MyStorageAccount -s * -d "download/path" --recursive
The download source container.
The destination file path to download to.
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Recursively download blobs.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The download source path.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Sync blobs recursively to a storage blob container using AzCopy.
To learn more about azcopy sync,see https://docs.microsoft.com/azure/storage/common/storage-ref-azcopy-sync.
az storage azcopy blob sync --container
--source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--connection-string]
[--destination]
[--sas-token]
Sync a single blob to a container.
az storage azcopy blob sync -c MyContainer --account-name MyStorageAccount -s "path/to/file" -d NewBlob
Sync a directory to a container.
az storage azcopy blob sync -c MyContainer --account-name MyStorageAccount -s "path/to/directory"
The sync destination container.
The source file path to sync from.
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The sync destination path.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Upload blobs to a storage blob container using AzCopy.
az storage azcopy blob upload --container
--source
[--account-key]
[--account-name]
[--auth-mode {key, login}]
[--connection-string]
[--destination]
[--recursive]
[--sas-token]
Upload a single blob to a container.
az storage azcopy blob upload -c MyContainer --account-name MyStorageAccount -s "path/to/file" -d NewBlob
Upload a directory to a container.
az storage azcopy blob upload -c MyContainer --account-name MyStorageAccount -s "path/to/directory" --recursive
Upload the contents of a directory to a container.
az storage azcopy blob upload -c MyContainer --account-name MyStorageAccount -s "path/to/directory/*" --recursive
The upload destination container.
The source file path to upload from.
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
The upload destination path.
Recursively upload blobs.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: