LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

az-storage

Manage Azure Cloud Storage resources

TLDR

Copy a local file to blob storage
$ az storage copy -s [/path/to/file.txt] -d https://[account].blob.core.windows.net/[container]/[blob]
copy
Download a blob to local filesystem
$ az storage copy -s https://[account].blob.core.windows.net/[container]/[blob] -d [/path/to/file.txt]
copy
Upload a directory recursively
$ az storage copy -s [/path/to/dir] -d https://[account].blob.core.windows.net/[container]/[path/] --recursive
copy
Copy between storage accounts
$ az storage copy -s https://[src].blob.core.windows.net/[container]/[blob] -d https://[dest].blob.core.windows.net/[container]/[blob]
copy
Delete a blob
$ az storage remove -c [container-name] -n [blob-name] --account-name [account]
copy
Delete a directory recursively
$ az storage remove -c [container-name] -n [path/to/directory] --recursive --account-name [account]
copy
Copy from AWS S3 to Azure Blob
$ az storage copy -s https://s3.amazonaws.com/[bucket]/[object] -d https://[account].blob.core.windows.net/[container]/[blob]
copy

SYNOPSIS

az storage subcommand [options]

DESCRIPTION

az storage manages Azure Cloud Storage resources including storage accounts, blob containers, file shares, queues, and tables. It provides commands for uploading, downloading, copying, and managing stored data.Azure Storage offers multiple storage types: Blob storage for unstructured data, File storage for SMB file shares, Queue storage for messaging, and Table storage for NoSQL data.

PARAMETERS

--account-name value

Storage account name
--account-key value
Storage account access key
--connection-string value
Storage account connection string
-c, --container value
Blob container name
-s, --source value
Source path (local or URL)
-d, --destination value
Destination path (local or URL)
--recursive
Process subdirectories recursively.
--auth-mode value
Authentication mode: key (uses account key) or login (uses Azure AD credentials).
--sas-token value
Shared access signature token used to authenticate the request.

SUBCOMMANDS

Account Management

account create, account delete, account list, account show, account keys list
Blob Storage
blob upload, blob download, blob delete, blob list, blob copy
Containers
container create, container delete, container list, container lease
File Shares
share create, share delete, share list, file upload, file download
Copy Operations
copy, remove
Data Lake Gen2
fs create, fs file upload, fs directory create
Queue & Table
queue create, queue list, message put, table create, entity insert

CAVEATS

Commands support multiple authentication methods: account key, SAS token, Azure AD login, or connection string. The copy and remove commands use AzCopy under the hood and support S3-to-Azure and Google Cloud Storage-to-Azure transfers. Wildcard patterns work differently than shell globbing; use --include-pattern and --exclude-pattern for filtering. Some subcommands require installing the storage-preview extension.

HISTORY

az storage is part of the Azure CLI, Microsoft's cross-platform command-line tool first released in 2014 (originally as xplat-cli). The modern `az` interface rewritten in Python launched in 2017. The az storage copy and az storage remove commands integrate AzCopy v10, replacing older upload/download flows with a faster, resumable transfer engine.

SEE ALSO

Copied to clipboard
Kai