az storage blob copy

Manage blob copy operations.

Commands

az storage blob copy cancel Aborts a pending copy_blob operation, and leaves a destination blob with zero length and full metadata.
az storage blob copy start Copies a blob asynchronously.
az storage blob copy start-batch Copy multiple blobs or files to a blob container.

az storage blob copy cancel

Aborts a pending copy_blob operation, and leaves a destination blob with zero length and full metadata.

az storage blob copy cancel --copy-id
--destination-blob
--destination-container
[--account-key]
[--account-name]
[--connection-string]
[--lease-id]
[--sas-token]
[--timeout]

Required Parameters

--copy-id
Copy identifier provided in the copy.id of the original copy_blob operation.
--destination-blob -b
Name of the destination blob. If the exists, it will be overwritten.
--destination-container -c
The container name.

Optional Parameters

--account-key
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
--account-name
Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.
--connection-string
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
--lease-id
Required if the destination blob has an active infinite lease.
--sas-token
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
--timeout
Request timeout in seconds. Applies to each call to the service.

az storage blob copy start

Copies a blob asynchronously.

az storage blob copy start --destination-blob
--destination-container
[--account-key]
[--account-name]
[--connection-string]
[--destination-if-match]
[--destination-if-modified-since]
[--destination-if-none-match]
[--destination-if-unmodified-since]
[--destination-lease-id]
[--metadata]
[--sas-token]
[--source-account-key]
[--source-account-name]
[--source-blob]
[--source-container]
[--source-if-match]
[--source-if-modified-since]
[--source-if-none-match]
[--source-if-unmodified-since]
[--source-lease-id]
[--source-path]
[--source-sas]
[--source-share]
[--source-snapshot]
[--source-uri]
[--timeout]

Required Parameters

--destination-blob -b
Name of the destination blob. If the exists, it will be overwritten.
--destination-container -c
The container name.

Optional Parameters

--account-key
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
--account-name
Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.
--connection-string
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
--destination-if-match
An ETag value, or the wildcard character (*). Specify an ETag value for this conditional header to copy the blob only if the specified ETag value matches the ETag value for an existing destination blob. If the ETag for the destination blob does not match the ETag specified for If-Match, the Blob service returns status code 412 (Precondition Failed).
--destination-if-modified-since
A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this conditional header to copy the blob only if the destination blob has been modified since the specified date/time. If the destination blob has not been modified, the Blob service returns status code 412 (Precondition Failed).
--destination-if-none-match
An ETag value, or the wildcard character (*). Specify an ETag value for this conditional header to copy the blob only if the specified ETag value does not match the ETag value for the destination blob. Specify the wildcard character (*) to perform the operation only if the destination blob does not exist. If the specified condition isn't met, the Blob service returns status code 412 (Precondition Failed).
--destination-if-unmodified-since
A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this conditional header to copy the blob only if the destination blob has not been modified since the specified date/time. If the destination blob has been modified, the Blob service returns status code 412 (Precondition Failed).
--destination-lease-id
The lease ID specified for this header must match the lease ID of the destination blob. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed).
--metadata
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
--sas-token
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
--source-account-key
The storage account key of the source blob.
--source-account-name
The storage account name of the source blob.
--source-blob
The blob name for the source storage account.
--source-container
The container name for the source storage account.
--source-if-match
An ETag value, or the wildcard character (*). Specify this conditional header to copy the source blob only if its ETag matches the value specified. If the ETag values do not match, the Blob service returns status code 412 (Precondition Failed). This header cannot be specified if the source is an Azure File.
--source-if-modified-since
A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this conditional header to copy the blob only if the source blob has been modified since the specified date/time.
--source-if-none-match
An ETag value, or the wildcard character (*). Specify this conditional header to copy the blob only if its ETag does not match the value specified. If the values are identical, the Blob service returns status code 412 (Precondition Failed). This header cannot be specified if the source is an Azure File.
--source-if-unmodified-since
A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this conditional header to copy the blob only if the source blob has not been modified since the specified date/time.
--source-lease-id
Specify this to perform the Copy Blob operation only if the lease ID given matches the active lease ID of the source blob.
--source-path
The file path for the source storage account.
--source-sas
The shared access signature for the source storage account.
--source-share
The share name for the source storage account.
--source-snapshot
The blob snapshot for the source storage account.
--source-uri -u
A URL of up to 2 KB in length that specifies an Azure file or blob. The value should be URL-encoded as it would appear in a request URI. If the source is in another account, the source must either be public or must be authenticated via a shared access signature. If the source is public, no authentication is required. Examples: https://myaccount.blob.core.windows.net/mycontainer/myblob https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime> https://otheraccount.blob.core.windows.net/mycontainer/myblob?sastoken.
--timeout
Request timeout in seconds. Applies to each call to the service.

az storage blob copy start-batch

Copy multiple blobs or files to a blob container.

az storage blob copy start-batch [--account-key]
[--account-name]
[--connection-string]
[--destination-container]
[--dryrun]
[--pattern]
[--sas-token]
[--source-account-key]
[--source-account-name]
[--source-container]
[--source-sas]
[--source-share]
[--source-uri]

Optional Parameters

--account-key
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
--account-name
Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.
--connection-string
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
--destination-container
The blob container where the selected source files or blobs will be copied to.
--dryrun
List the files or blobs to be uploaded. No actual data transfer will occur.
--pattern
The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq', and '[!seq]'.
--sas-token
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
--source-account-key
The account key for the source storage account.
--source-account-name
The source storage account from which the files or blobs are copied to the destination. If omitted, the source account is used.
--source-container
The source container from which blobs are copied.
--source-sas
The shared access signature for the source storage account.
--source-share
The source share from which files are copied.
--source-uri
A URI specifying a file share or blob container from which the files or blobs are copied.