共用方式為


az storage file copy

Note

此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入了解擴充功能。

管理檔案複製作業。

命令

名稱 Description 類型 狀態
az storage file copy cancel

中止進行中的複製作業。

Core GA
az storage file copy cancel (storage-preview 擴充功能)

中止進行中的複製作業。

Extension GA
az storage file copy start

以異步方式複製檔案。

Core GA
az storage file copy start (storage-preview 擴充功能)

以異步方式複製檔案。

Extension GA
az storage file copy start-batch

將多個檔案或 Blob 複製到檔案共用。

Core GA
az storage file copy start-batch (storage-preview 擴充功能)

將多個檔案或 Blob 複製到檔案共用。

Extension GA

az storage file copy cancel

中止進行中的複製作業。

這會讓目的地檔案保持零長度和完整元數據。 如果複製作業已經結束,就會引發錯誤。

az storage file copy cancel --copy-id
                            --destination-path
                            --destination-share
                            [--account-key]
                            [--account-name]
                            [--auth-mode {key, login}]
                            [--backup-intent --enable-file-backup-request-intent]
                            [--connection-string]
                            [--disallow-trailing-dot {false, true}]
                            [--file-endpoint]
                            [--sas-token]
                            [--timeout]

必要參數

--copy-id

要中止的複製作業。 這可以是標識碼或 FileProperties 的實例。

--destination-path -p

檔案共用內檔案的路徑。

--destination-share -s

目的地共用的名稱。 共用必須存在。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--account-key

儲存體帳戶金鑰。 必須與記憶體帳戶名稱或服務端點搭配使用。 環境變數:AZURE_STORAGE_KEY。

屬性
參數群組: Storage Account Arguments
--account-name

儲存體帳戶名稱。 相關的環境變數:AZURE_STORAGE_ACCOUNT。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 如果兩者都不存在,命令會嘗試使用已驗證的 Azure 帳戶來查詢記憶體帳戶密鑰。 如果執行大量儲存命令,可能會達到 API 配額。

屬性
參數群組: Storage Account Arguments
--auth-mode

執行命令的模式。 「登入」模式將直接使用您的登入認證進行驗證。 如果未提供帳戶的驗證參數,舊版「金鑰」模式將會嘗試查詢帳戶密鑰。 環境變數:AZURE_STORAGE_AUTH_MODE。

屬性
接受的值: key, login
--backup-intent --enable-file-backup-request-intent

與檔案的 OAuth (Azure AD) 驗證搭配使用的必要參數。 這會略過任何檔案/目錄層級許可權檢查,並根據允許的數據動作允許存取,即使這些檔案/目錄有 ACL。

屬性
預設值: False
--connection-string

記憶體帳戶連接字串。 環境變數:AZURE_STORAGE_CONNECTION_STRING。

屬性
參數群組: Storage Account Arguments
--disallow-trailing-dot

如果為 true,則會從目標 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--file-endpoint

記憶體數據服務端點。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 您可以使用 找到每個服務主要端點 az storage account show。 環境變數:AZURE_STORAGE_SERVICE_ENDPOINT。

屬性
參數群組: Storage Account Arguments
--sas-token

共用存取簽章 (SAS)。 必須與記憶體帳戶名稱或服務端點搭配使用。 環境變數:AZURE_STORAGE_SAS_TOKEN。

屬性
參數群組: Storage Account Arguments
--timeout

要求以秒為單位的逾時。 適用於服務的每個呼叫。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az storage file copy cancel (storage-preview 擴充功能)

中止進行中的複製作業。

這會讓目的地檔案保持零長度和完整元數據。 如果複製作業已經結束,就會引發錯誤。

az storage file copy cancel --copy-id
                            --destination-path
                            --destination-share
                            [--account-key]
                            [--account-name]
                            [--auth-mode {key, login}]
                            [--backup-intent --enable-file-backup-request-intent]
                            [--connection-string]
                            [--disallow-trailing-dot {false, true}]
                            [--sas-token]
                            [--timeout]

必要參數

--copy-id

要中止的複製作業。 這可以是標識碼或 FileProperties 的實例。

--destination-path -p

檔案共用內檔案的路徑。

--destination-share -s

目的地共用的名稱。 共用必須存在。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--account-key

儲存體帳戶金鑰。 必須與記憶體帳戶名稱搭配使用。 環境變數:AZURE_STORAGE_KEY。

屬性
參數群組: Storage Account Arguments
--account-name

儲存體帳戶名稱。 相關的環境變數:AZURE_STORAGE_ACCOUNT。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 如果兩者都不存在,命令會嘗試使用已驗證的 Azure 帳戶來查詢記憶體帳戶密鑰。 如果執行大量儲存命令,可能會達到 API 配額。

屬性
參數群組: Storage Account Arguments
--auth-mode

執行命令的模式。 「登入」模式將直接使用您的登入認證進行驗證。 如果未提供帳戶的驗證參數,舊版「金鑰」模式將會嘗試查詢帳戶密鑰。 環境變數:AZURE_STORAGE_AUTH_MODE。

屬性
接受的值: key, login
--backup-intent --enable-file-backup-request-intent

與檔案的 OAuth (Azure AD) 驗證搭配使用的必要參數。 這會略過任何檔案/目錄層級許可權檢查,並根據允許的數據動作允許存取,即使這些檔案/目錄有 ACL。

屬性
預設值: False
--connection-string

記憶體帳戶連接字串。 環境變數:AZURE_STORAGE_CONNECTION_STRING。

屬性
參數群組: Storage Account Arguments
--disallow-trailing-dot

如果為 true,則會從目標 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--sas-token

共用存取簽章 (SAS)。 必須與記憶體帳戶名稱搭配使用。 環境變數:AZURE_STORAGE_SAS_TOKEN。

屬性
參數群組: Storage Account Arguments
--timeout

要求以秒為單位的逾時。 適用於服務的每個呼叫。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az storage file copy start

以異步方式複製檔案。

az storage file copy start --destination-path
                           --destination-share
                           [--account-key]
                           [--account-name]
                           [--auth-mode {key, login}]
                           [--backup-intent --enable-file-backup-request-intent]
                           [--connection-string]
                           [--disallow-source-trailing-dot --disallow-src-trailing {false, true}]
                           [--disallow-trailing-dot {false, true}]
                           [--file-endpoint]
                           [--file-mode]
                           [--file-mode-copy-mode {override, source}]
                           [--file-snapshot]
                           [--group]
                           [--metadata]
                           [--owner]
                           [--owner-copy-mode {override, source}]
                           [--sas-token]
                           [--source-account-key]
                           [--source-account-name]
                           [--source-blob]
                           [--source-container]
                           [--source-path]
                           [--source-sas]
                           [--source-share]
                           [--source-snapshot]
                           [--source-uri]
                           [--timeout]

範例

以異步方式複製檔案。

az storage file copy start --source-account-name srcaccount --source-account-key 00000000 --source-path <srcpath-to-file> --source-share srcshare --destination-path <destpath-to-file> --destination-share destshare --account-name destaccount --account-key 00000000

使用 sas 令牌,以異步方式將檔案從來源 URI 複製到目的地記憶體帳戶。

az storage file copy start --source-uri "https://srcaccount.file.core.windows.net/myshare/mydir/myfile?<sastoken>" --destination-path <destpath-to-file> --destination-share destshare --account-name destaccount --sas-token <destination-sas>

使用 sas 令牌,以異步方式將檔案從檔案快照集複製到目的地記憶體帳戶。

az storage file copy start --source-account-name srcaccount --source-account-key 00000000 --source-path <srcpath-to-file> --source-share srcshare --file-snapshot "2020-03-02T13:51:54.0000000Z" --destination-path <destpath-to-file> --destination-share destshare --account-name destaccount --sas-token <destination-sas>

使用來源檔案模式、群組、擁有者複製檔案。

az storage file copy start --source-account-name srcaccount --source-path srcpath --source-share srcshare --destination-path dstpath --destination-share dstshare --owner-copy-mode Source --file-mode-copy-mode Source

複製具有已覆寫檔案模式、群組、擁有者的檔案。

az storage file copy start --source-account-name srcaccount --source-path srcpath --source-share srcshare --destination-path dstpath --destination-share dstshare --owner-copy-mode Override --file-mode-copy-mode Override --file-mode rw-rw-rw- --owner 4 --group 5

必要參數

--destination-path -p

檔案共用內檔案的路徑。

--destination-share -s

目的地共用的名稱。 共用必須存在。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--account-key

儲存體帳戶金鑰。 必須與記憶體帳戶名稱或服務端點搭配使用。 環境變數:AZURE_STORAGE_KEY。

屬性
參數群組: Storage Account Arguments
--account-name

儲存體帳戶名稱。 相關的環境變數:AZURE_STORAGE_ACCOUNT。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 如果兩者都不存在,命令會嘗試使用已驗證的 Azure 帳戶來查詢記憶體帳戶密鑰。 如果執行大量儲存命令,可能會達到 API 配額。

屬性
參數群組: Storage Account Arguments
--auth-mode

執行命令的模式。 「登入」模式將直接使用您的登入認證進行驗證。 如果未提供帳戶的驗證參數,舊版「金鑰」模式將會嘗試查詢帳戶密鑰。 環境變數:AZURE_STORAGE_AUTH_MODE。

屬性
接受的值: key, login
--backup-intent --enable-file-backup-request-intent

與檔案的 OAuth (Azure AD) 驗證搭配使用的必要參數。 這會略過任何檔案/目錄層級許可權檢查,並根據允許的數據動作允許存取,即使這些檔案/目錄有 ACL。

屬性
預設值: False
--connection-string

記憶體帳戶連接字串。 環境變數:AZURE_STORAGE_CONNECTION_STRING。

屬性
參數群組: Storage Account Arguments
--disallow-source-trailing-dot --disallow-src-trailing

如果為 true,則會從來源 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--disallow-trailing-dot

如果為 true,則會從目標 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--file-endpoint

記憶體數據服務端點。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 您可以使用 找到每個服務主要端點 az storage account show。 環境變數:AZURE_STORAGE_SERVICE_ENDPOINT。

屬性
參數群組: Storage Account Arguments
--file-mode

要設定於檔案上的模式許可權。 僅適用於 NFS 檔案。 只能與 參數 --file-mode-copy-mode Override搭配使用。 支援符號 (rwxrw-rw-) 。 黏性位也受到支援,而且它是由字母 t 或 T 在最後字元位置表示,視其他類別的執行位是分別設定或未設定而定,沒有 t 或 T 表示未設定黏性位。」。

--file-mode-copy-mode

僅適用於 NFS 檔案。 僅適用於複製來源為檔案時。 決定目的地檔案之模式位的複製行為。 如果未填入,目的地檔案將會有預設的檔案模式。

屬性
接受的值: override, source
--file-snapshot

來源記憶體帳戶的檔案快照集。

屬性
參數群組: Copy Source Arguments
--group

僅適用於 NFS 檔案。 只能與 參數 --owner-copy-mode Override搭配使用。 要設定在目錄上的擁有者群組標識碼 (GID)。 預設值為 0 (根群組)。

--metadata

以空格分隔的鍵值對中的元數據。 這會覆寫任何現有的元數據。

--owner

僅適用於 NFS 檔案。 只能與 參數 --owner-copy-mode Override搭配使用。 要設定在目錄上的擁有者使用者標識碼 (UID)。 預設值為 0 (root)。

--owner-copy-mode

僅適用於 NFS 檔案。 僅適用於複製來源為檔案時。 決定目的地檔案擁有者和群組的複製行為。 如果未填入,目的地檔案將會有預設的擁有者和群組。

屬性
接受的值: override, source
--sas-token

共用存取簽章 (SAS)。 必須與記憶體帳戶名稱或服務端點搭配使用。 環境變數:AZURE_STORAGE_SAS_TOKEN。

屬性
參數群組: Storage Account Arguments
--source-account-key

來源 Blob 的記憶體帳戶金鑰。

屬性
參數群組: Copy Source Arguments
--source-account-name

來源 Blob 的記憶體帳戶名稱。

屬性
參數群組: Copy Source Arguments
--source-blob

來源記憶體帳戶的 Blob 名稱。

屬性
參數群組: Copy Source Arguments
--source-container

來源記憶體帳戶的容器名稱。

屬性
參數群組: Copy Source Arguments
--source-path

來源記憶體帳戶的檔案路徑。

屬性
參數群組: Copy Source Arguments
--source-sas

來源記憶體帳戶的共用存取簽章。

屬性
參數群組: Copy Source Arguments
--source-share

來源記憶體帳戶的共享名稱。

屬性
參數群組: Copy Source Arguments
--source-snapshot

來源記憶體帳戶的 Blob 快照集。

屬性
參數群組: Copy Source Arguments
--source-uri -u

長度最多 2 KB 的 URL,指定 Azure 檔案或 Blob。 此值應該以 URL 編碼,因為它會出現在要求 URI 中。 如果來源位於另一個帳戶中,來源必須是公用或必須透過共用存取簽章進行驗證。 如果來源是公用的,則不需要驗證。 範例:https://myaccount.file.core.windows.net/myshare/mydir/myfilehttps://otheraccount.file.core.windows.net/myshare/mydir/myfile?sastoken

屬性
參數群組: Copy Source Arguments
--timeout

要求以秒為單位的逾時。 適用於服務的每個呼叫。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az storage file copy start (storage-preview 擴充功能)

以異步方式複製檔案。

az storage file copy start --destination-path
                           --destination-share
                           [--account-key]
                           [--account-name]
                           [--auth-mode {key, login}]
                           [--backup-intent --enable-file-backup-request-intent]
                           [--connection-string]
                           [--disallow-source-trailing-dot --disallow-src-trailing {false, true}]
                           [--disallow-trailing-dot {false, true}]
                           [--file-snapshot]
                           [--metadata]
                           [--sas-token]
                           [--source-account-key]
                           [--source-account-name]
                           [--source-blob]
                           [--source-container]
                           [--source-path]
                           [--source-sas]
                           [--source-share]
                           [--source-snapshot]
                           [--source-uri]
                           [--timeout]

範例

以異步方式複製檔案。

az storage file copy start --source-account-name srcaccount --source-account-key 00000000 --source-path <srcpath-to-file> --source-share srcshare --destination-path <destpath-to-file> --destination-share destshare --account-name destaccount --account-key 00000000

使用 sas 令牌,以異步方式將檔案從來源 URI 複製到目的地記憶體帳戶。

az storage file copy start --source-uri "https://srcaccount.file.core.windows.net/myshare/mydir/myfile?<sastoken>" --destination-path <destpath-to-file> --destination-share destshare --account-name destaccount --sas-token <destination-sas>

使用 sas 令牌,以異步方式將檔案從檔案快照集複製到目的地記憶體帳戶。

az storage file copy start --source-account-name srcaccount --source-account-key 00000000 --source-path <srcpath-to-file> --source-share srcshare --file-snapshot "2020-03-02T13:51:54.0000000Z" --destination-path <destpath-to-file> --destination-share destshare --account-name destaccount --sas-token <destination-sas>

必要參數

--destination-path -p

檔案共用內檔案的路徑。

--destination-share -s

目的地共用的名稱。 共用必須存在。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--account-key

儲存體帳戶金鑰。 必須與記憶體帳戶名稱搭配使用。 環境變數:AZURE_STORAGE_KEY。

屬性
參數群組: Storage Account Arguments
--account-name

儲存體帳戶名稱。 相關的環境變數:AZURE_STORAGE_ACCOUNT。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 如果兩者都不存在,命令會嘗試使用已驗證的 Azure 帳戶來查詢記憶體帳戶密鑰。 如果執行大量儲存命令,可能會達到 API 配額。

屬性
參數群組: Storage Account Arguments
--auth-mode

執行命令的模式。 「登入」模式將直接使用您的登入認證進行驗證。 如果未提供帳戶的驗證參數,舊版「金鑰」模式將會嘗試查詢帳戶密鑰。 環境變數:AZURE_STORAGE_AUTH_MODE。

屬性
接受的值: key, login
--backup-intent --enable-file-backup-request-intent

與檔案的 OAuth (Azure AD) 驗證搭配使用的必要參數。 這會略過任何檔案/目錄層級許可權檢查,並根據允許的數據動作允許存取,即使這些檔案/目錄有 ACL。

屬性
預設值: False
--connection-string

記憶體帳戶連接字串。 環境變數:AZURE_STORAGE_CONNECTION_STRING。

屬性
參數群組: Storage Account Arguments
--disallow-source-trailing-dot --disallow-src-trailing

如果為 true,則會從來源 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--disallow-trailing-dot

如果為 true,則會從目標 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--file-snapshot

來源記憶體帳戶的檔案快照集。

屬性
參數群組: Copy Source Arguments
--metadata

以空格分隔的鍵值對中的元數據。 這會覆寫任何現有的元數據。

--sas-token

共用存取簽章 (SAS)。 必須與記憶體帳戶名稱搭配使用。 環境變數:AZURE_STORAGE_SAS_TOKEN。

屬性
參數群組: Storage Account Arguments
--source-account-key

來源 Blob 的記憶體帳戶金鑰。

屬性
參數群組: Copy Source Arguments
--source-account-name

來源 Blob 的記憶體帳戶名稱。

屬性
參數群組: Copy Source Arguments
--source-blob

來源記憶體帳戶的 Blob 名稱。

屬性
參數群組: Copy Source Arguments
--source-container

來源記憶體帳戶的容器名稱。

屬性
參數群組: Copy Source Arguments
--source-path

來源記憶體帳戶的檔案路徑。

屬性
參數群組: Copy Source Arguments
--source-sas

來源記憶體帳戶的共用存取簽章。

屬性
參數群組: Copy Source Arguments
--source-share

來源記憶體帳戶的共享名稱。

屬性
參數群組: Copy Source Arguments
--source-snapshot

來源記憶體帳戶的 Blob 快照集。

屬性
參數群組: Copy Source Arguments
--source-uri -u

長度最多 2 KB 的 URL,指定 Azure 檔案或 Blob。 此值應該以 URL 編碼,因為它會出現在要求 URI 中。 如果來源位於另一個帳戶中,來源必須是公用或必須透過共用存取簽章進行驗證。 如果來源是公用的,則不需要驗證。 範例:https://myaccount.file.core.windows.net/myshare/mydir/myfilehttps://otheraccount.file.core.windows.net/myshare/mydir/myfile?sastoken

屬性
參數群組: Copy Source Arguments
--timeout

要求以秒為單位的逾時。 適用於服務的每個呼叫。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az storage file copy start-batch

將多個檔案或 Blob 複製到檔案共用。

az storage file copy start-batch [--account-key]
                                 [--account-name]
                                 [--connection-string]
                                 [--destination-path]
                                 [--destination-share]
                                 [--disallow-source-trailing-dot --disallow-src-trailing {false, true}]
                                 [--disallow-trailing-dot {false, true}]
                                 [--dryrun]
                                 [--file-endpoint]
                                 [--metadata]
                                 [--pattern]
                                 [--sas-token]
                                 [--source-account-key]
                                 [--source-account-name]
                                 [--source-container]
                                 [--source-sas]
                                 [--source-share]
                                 [--source-uri]
                                 [--timeout]

範例

將檔案共用中的所有檔案複製到另一個記憶體帳戶。

az storage file copy start-batch --source-account-name srcaccount --source-account-key 00000000 --source-share srcshare --destination-path <destpath-to-directory> --destination-share destshare --account-name destaccount --account-key 00000000

將檔案共用中的所有檔案複製到另一個記憶體帳戶。 使用 sas 令牌。

az storage file copy start-batch --source-uri "https://srcaccount.file.core.windows.net/myshare?<sastoken>" --destination-path <destpath-to-directory> --destination-share destshare --account-name destaccount --sas-token <destination-sas>

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--account-key

儲存體帳戶金鑰。 必須與記憶體帳戶名稱或服務端點搭配使用。 環境變數:AZURE_STORAGE_KEY。

屬性
參數群組: Storage Account Arguments
--account-name

儲存體帳戶名稱。 相關的環境變數:AZURE_STORAGE_ACCOUNT。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 如果兩者都不存在,命令會嘗試使用已驗證的 Azure 帳戶來查詢記憶體帳戶密鑰。 如果執行大量儲存命令,可能會達到 API 配額。

屬性
參數群組: Storage Account Arguments
--connection-string

記憶體帳戶連接字串。 環境變數:AZURE_STORAGE_CONNECTION_STRING。

屬性
參數群組: Storage Account Arguments
--destination-path

源數據複製到其中的目錄。 如果省略,則會將數據複製到根目錄。

--destination-share

將源數據複製到其中的檔案共用。

--disallow-source-trailing-dot --disallow-src-trailing

如果為 true,則會從來源 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--disallow-trailing-dot

如果為 true,則會從目標 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--dryrun

列出要複製的檔案和 Blob。 不會進行實際的數據傳輸。

屬性
預設值: False
--file-endpoint

記憶體數據服務端點。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 您可以使用 找到每個服務主要端點 az storage account show。 環境變數:AZURE_STORAGE_SERVICE_ENDPOINT。

屬性
參數群組: Storage Account Arguments
--metadata

以空格分隔的鍵值對中的元數據。 這會覆寫任何現有的元數據。

--pattern

用於擷取檔案和 Blob 的模式。 支援的模式為 '*'、'?'、'[seq]'和 '[!seq]'。 如需詳細資訊,請參閱 https://docs.python.org/3/library/fnmatch.html

當您在 --pattern 中使用 '*' 時,它會比對包含目錄分隔符 '/' 的任何字元。

--sas-token

共用存取簽章 (SAS)。 必須與記憶體帳戶名稱或服務端點搭配使用。 環境變數:AZURE_STORAGE_SAS_TOKEN。

屬性
參數群組: Storage Account Arguments
--source-account-key

來源記憶體帳戶的帳戶的帳戶金鑰。 如果省略,則會使用作用中的登入來判斷帳戶密鑰。

屬性
參數群組: Copy Source Arguments
--source-account-name

要從中複製數據的來源記憶體帳戶。 如果省略,則會使用目的地帳戶。

屬性
參數群組: Copy Source Arguments
--source-container

來源容器 Blob 會從 複製。

屬性
參數群組: Copy Source Arguments
--source-sas

來源記憶體帳戶的共用存取簽章。

屬性
參數群組: Copy Source Arguments
--source-share

來源共用檔案會從複製。

屬性
參數群組: Copy Source Arguments
--source-uri

指定來源檔案共享或 Blob 容器的 URI。

如果來源位於另一個帳戶中,來源必須是公用或透過共用存取簽章進行驗證。

屬性
參數群組: Copy Source Arguments
--timeout

要求以秒為單位的逾時。 適用於服務的每個呼叫。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az storage file copy start-batch (storage-preview 擴充功能)

將多個檔案或 Blob 複製到檔案共用。

az storage file copy start-batch [--account-key]
                                 [--account-name]
                                 [--connection-string]
                                 [--destination-path]
                                 [--destination-share]
                                 [--disallow-source-trailing-dot --disallow-src-trailing {false, true}]
                                 [--disallow-trailing-dot {false, true}]
                                 [--dryrun]
                                 [--metadata]
                                 [--pattern]
                                 [--sas-token]
                                 [--source-account-key]
                                 [--source-account-name]
                                 [--source-container]
                                 [--source-sas]
                                 [--source-share]
                                 [--source-uri]
                                 [--timeout]

範例

將檔案共用中的所有檔案複製到另一個記憶體帳戶。

az storage file copy start-batch --source-account-name srcaccount --source-account-key 00000000 --source-share srcshare --destination-path <destpath-to-directory> --destination-share destshare --account-name destaccount --account-key 00000000

將檔案共用中的所有檔案複製到另一個記憶體帳戶。 使用 sas 令牌。

az storage file copy start-batch --source-uri "https://srcaccount.file.core.windows.net/myshare?<sastoken>" --destination-path <destpath-to-directory> --destination-share destshare --account-name destaccount --sas-token <destination-sas>

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--account-key

儲存體帳戶金鑰。 必須與記憶體帳戶名稱搭配使用。 環境變數:AZURE_STORAGE_KEY。

屬性
參數群組: Storage Account Arguments
--account-name

儲存體帳戶名稱。 相關的環境變數:AZURE_STORAGE_ACCOUNT。 必須與記憶體帳戶金鑰或 SAS 令牌搭配使用。 如果兩者都不存在,命令會嘗試使用已驗證的 Azure 帳戶來查詢記憶體帳戶密鑰。 如果執行大量儲存命令,可能會達到 API 配額。

屬性
參數群組: Storage Account Arguments
--connection-string

記憶體帳戶連接字串。 環境變數:AZURE_STORAGE_CONNECTION_STRING。

屬性
參數群組: Storage Account Arguments
--destination-path

源數據複製到其中的目錄。 如果省略,則會將數據複製到根目錄。

--destination-share

將源數據複製到其中的檔案共用。

--disallow-source-trailing-dot --disallow-src-trailing

如果為 true,則會從來源 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--disallow-trailing-dot

如果為 true,則會從目標 URI 修剪尾端點。 預設值為 False。

屬性
預設值: False
接受的值: false, true
--dryrun

列出要複製的檔案和 Blob。 不會進行實際的數據傳輸。

屬性
預設值: False
--metadata

以空格分隔的鍵值對中的元數據。 這會覆寫任何現有的元數據。

--pattern

用於擷取檔案和 Blob 的模式。 支援的模式為 '*'、'?'、'[seq]'和 '[!seq]'。 如需詳細資訊,請參閱 https://docs.python.org/3.7/library/fnmatch.html

當您在 --pattern 中使用 '*' 時,它會比對包含目錄分隔符 '/' 的任何字元。

--sas-token

共用存取簽章 (SAS)。 必須與記憶體帳戶名稱搭配使用。 環境變數:AZURE_STORAGE_SAS_TOKEN。

屬性
參數群組: Storage Account Arguments
--source-account-key

來源記憶體帳戶的帳戶的帳戶金鑰。 如果省略,則會使用作用中的登入來判斷帳戶密鑰。

屬性
參數群組: Copy Source Arguments
--source-account-name

要從中複製數據的來源記憶體帳戶。 如果省略,則會使用目的地帳戶。

屬性
參數群組: Copy Source Arguments
--source-container

來源容器 Blob 會從 複製。

屬性
參數群組: Copy Source Arguments
--source-sas

來源記憶體帳戶的共用存取簽章。

屬性
參數群組: Copy Source Arguments
--source-share

來源共用檔案會從複製。

屬性
參數群組: Copy Source Arguments
--source-uri

指定來源檔案共享或 Blob 容器的 URI。

如果來源位於另一個帳戶中,來源必須是公用或透過共用存取簽章進行驗證。

屬性
參數群組: Copy Source Arguments
--timeout

要求以秒為單位的逾時。 適用於服務的每個呼叫。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False