File copy operations - az storage file copy

Manage file copy operations.

Commands

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

az storage file copy cancel

Aborts a pending copy_file operation, and leaves a destination file with zero length and full metadata.

az storage file copy cancel --copy-id
--destination-path
--destination-share
[--account-key]
[--account-name]
[--connection-string]
[--sas-token]
[--timeout]

Required Parameters

--copy-id

Copy identifier provided in the copy.id of the original copy_file operation.

--destination-path -p

The path to the file within the file share.

--destination-share -s

Name of the destination share. The share must exist.

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.

--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 file copy start

This operation returns a copy operation properties object, including a copy ID you can use to check or abort the copy operation. The File service copies files on a best-effort basis. If the destination file exists, it will be overwritten. The destination file cannot be modified while the copy operation is in progress.

az storage file copy start --destination-path
--destination-share
[--account-key]
[--account-name]
[--connection-string]
[--metadata]
[--sas-token]
[--source-account-key]
[--source-account-name]
[--source-blob]
[--source-container]
[--source-path]
[--source-sas]
[--source-share]
[--source-snapshot]
[--source-uri]
[--timeout]

Required Parameters

--destination-path -p

The path to the file within the file share.

--destination-share -s

Name of the destination share. The share must exist.

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.

--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-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.file.core.windows.net/myshare/mydir/myfile https://otheraccount.file.core.windows.net/myshare/mydir/myfile?sastoken.

--timeout

Request timeout in seconds. Applies to each call to the service.

az storage file copy start-batch

Copy multiple files or blobs to a file share.

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

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-path

The directory where the specified source files or blobs are to be copied to. If omitted, the files or blobs are copied to the root directory.

--destination-share

The file share where the specified source files or blobs are to be copied to.

--dryrun

The list of files or blobs to be uploaded. No actual data transfer occurs.

--metadata

Metadata in space-separated key=value pairs. This overwrites any existing metadata.

--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. If it is omitted, the command will try to query the key using the current log in.

--source-account-name

The source storage account from which the files or blobs are copied to the destination. If omitted, it is assumed that source is in the same storage account as destination.

--source-container

The source container from which the blobs are copied to the destination.

--source-sas

The shared access signature for the source storage account.

--source-share

The source share from which the files are copied to the destination.

--source-uri

A URI that specifies a file share or blob container from which files or blobs are copied to the destination. 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.

--timeout

Request timeout in seconds. Applies to each call to the service.