az restore-point

使用 res 管理還原點。

命令

名稱 Description 類型 狀態
az restore-point collection

建立還原點集合。 如需詳細資訊, https://aka.ms/RestorePoints 請參閱 。 更新還原點集合時,只能修改標記。

核心 GA
az restore-point collection create

建立還原點集合。 如需詳細資訊, https://aka.ms/RestorePoints 請參閱 。 更新還原點集合時,只能修改標記。

核心 GA
az restore-point collection delete

刪除還原點集合。 此作業也會刪除所有包含的還原點。

核心 GA
az restore-point collection list

取得資源群組中的還原點集合清單。

核心 GA
az restore-point collection list-all

取得訂用帳戶中的還原點集合清單。 在回應中使用 nextLink 屬性來取得還原點集合的下一頁。 請執行此動作,直到 nextLink 不是 Null,以擷取所有還原點集合。

核心 GA
az restore-point collection show

取得還原點集合。

核心 GA
az restore-point collection update

更新還原點集合。

核心 GA
az restore-point collection wait

將 CLI 置於等候狀態,直到符合還原點集合的條件為止。

核心 GA
az restore-point create

建立還原點。 不允許更新現有還原點的屬性。

核心 GA
az restore-point delete

刪除還原點。

核心 GA
az restore-point show

取得還原點。

核心 GA
az restore-point wait

將 CLI 置於等候狀態,直到符合還原點的條件為止。

核心 GA

az restore-point create

建立還原點。 不允許更新現有還原點的屬性。

az restore-point create --collection-name
                        --name
                        --resource-group
                        [--consistency-mode {ApplicationConsistent, CrashConsistent, FileSystemConsistent}]
                        [--data-disk-restore-point-encryption-set]
                        [--data-disk-restore-point-encryption-type {EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, EncryptionAtRestWithPlatformKey}]
                        [--exclude-disks]
                        [--no-wait]
                        [--os-restore-point-encryption-set]
                        [--os-restore-point-encryption-type {EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, EncryptionAtRestWithPlatformKey}]
                        [--source-data-disk-resource]
                        [--source-os-resource]
                        [--source-restore-point]

範例

建立還原點

az restore-point create --exclude-disks "/subscriptions/{subscription-id}/resourceGroups/myResour               ceGroup/providers/Microsoft.Compute/disks/disk123" --resource-group "myResourceGroup"                --collection-name "rpcName" --name "rpName"

使用 --consistency-mode CrashConsistent 建立還原點

az vm create -n vm -g rg --image Ubuntu2204 --tag EnableCrashConsistentRestorePoint=True

az restore-point collection create --source-id "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"                -g rg --collection-name "myRpc"

az restore-point create --exclude-disks "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123"                --resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName"

必要參數

--collection-name

還原點集合的名稱。

--name --restore-point-name -n

還原點的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--consistency-mode
預覽

還原點的一致性模式。 可以在建立還原點時於輸入中指定。 目前,只有 CrashConsistent 會接受為有效的輸入。 如需詳細資訊, https://aka.ms/RestorePoints 請參閱 。

接受的值: ApplicationConsistent, CrashConsistent, FileSystemConsistent
--data-disk-restore-point-encryption-set

客戶受控數據磁碟加密集資源標識碼。

--data-disk-restore-point-encryption-type

用來加密數據磁碟還原點數據的金鑰類型。

接受的值: EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, EncryptionAtRestWithPlatformKey
--exclude-disks

客戶想要從還原點排除的磁碟資源標識符清單。 如果未指定任何磁碟,則會包含所有磁碟。

使用量:--exclude-disks XX XX 標識符:以 /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... 格式的 ARM 資源標識符您可以使用多個 --exclude-disks 自變數來指定多個動作。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--os-restore-point-encryption-set

客戶受控 OS 磁碟加密集資源標識碼。

--os-restore-point-encryption-type

用來加密OS磁碟還原點數據的金鑰類型。

接受的值: EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, EncryptionAtRestWithPlatformKey
--source-data-disk-resource

源數據磁碟的資源標識碼。

--source-os-resource

來源OS磁碟的資源標識碼。

--source-restore-point

需要建立複本的來源還原點資源標識碼。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az restore-point delete

刪除還原點。

az restore-point delete [--collection-name]
                        [--ids]
                        [--name]
                        [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                        [--resource-group]
                        [--subscription]
                        [--yes]

選擇性參數

--collection-name --restore-point-collection-name

還原點集合的名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name --restore-point-name -n

還原點的名稱。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

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

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az restore-point show

取得還原點。

az restore-point show --collection-name
                      --name
                      --resource-group
                      [--instance-view]

範例

取得還原點

az restore-point show --resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName"

必要參數

--collection-name

還原點集合的名稱。

--name --restore-point-name -n

還原點的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--instance-view

顯示還原點的實例檢視。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az restore-point wait

將 CLI 置於等候狀態,直到符合還原點的條件為止。

az restore-point wait --collection-name
                      --name
                      --resource-group
                      [--created]
                      [--custom]
                      [--deleted]
                      [--exists]
                      [--expand]
                      [--interval]
                      [--timeout]
                      [--updated]

範例

暫停執行下一行 CLI 腳本,直到成功建立還原點為止。

az restore-point wait --resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName" --created

暫停執行下一行 CLI 腳本,直到還原點成功刪除為止。

az restore-point wait --resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName" --deleted

必要參數

--collection-name

還原點集合的名稱。

--name --restore-point-name -n

還原點的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--expand

要套用至作業的展開表達式。 'InstanceView' 會擷取還原點運行時間狀態的相關信息。 'instanceView' 預設值為 None。

--interval

輪詢間隔以秒為單位。

預設值: 30
--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。