az storage file copy

Manage asynchronous file copy operations.

Commands

Name Description Type Status
az storage file copy start

Start an asynchronous copy into a file.

Core Preview

az storage file copy start

Preview

Start an asynchronous copy into a file.

Start a server-side copy into a file in a file share. The source must be an Azure file or blob; a source in another account must be readable, for example through a SAS token. The command returns once the copy is scheduled; check its status with az storage file show.

az storage file copy start [--account-key]
                           [--account-name]
                           [--client-request-id]
                           [--metadata]
                           [--path]
                           [--sas-token]
                           [--share-name]
                           [--source-uri]
                           [--timeout]
                           [--url]

Examples

Copy a file within the share

az storage file copy start --account-name mystorageaccount --account-key $ACCOUNT_KEY --share-name myshare --path mydir/copy.txt --source-uri https://mystorageaccount.file.core.windows.net/myshare/mydir/myfile.txt

Copy a blob into a file

az storage file copy start --account-name mystorageaccount --account-key $ACCOUNT_KEY --share-name myshare --path mydir/fromblob.txt --source-uri https://mystorageaccount.blob.core.windows.net/mycontainer/myblob.txt

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-key

Storage account key.

--account-name

Storage account name. Used with the share name and file path when --url is not given.

--client-request-id

An opaque, globally-unique, client-generated string identifier for the request.

--metadata

Destination metadata in space-separated key=value pairs. The source metadata is copied when not given.

--path

The destination file path within the share, e.g. dir/file.txt.

--sas-token

A shared access signature. Alternative to --account-key.

--share-name

The share name.

--source-uri

The source file or blob URL. It must be in the destination account or carry a SAS.

--timeout

The timeout parameter is expressed in seconds.

--url

The destination file URL. Alternative to --account-name, --share-name and --path.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.