az restore-point
使用 res 管理還原點。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az restore-point collection |
建立還原點集合。 如需詳細資訊,請參閱 https://aka.ms/RestorePoints。 更新還原點集合時,只能修改標記。 |
Core | GA |
az restore-point collection create |
建立還原點集合。 如需詳細資訊,請參閱 https://aka.ms/RestorePoints。 更新還原點集合時,只能修改標記。 |
Core | GA |
az restore-point collection delete |
刪除還原點集合。 此作業也會刪除所有包含的還原點。 |
Core | GA |
az restore-point collection list |
取得資源群組中的還原點集合清單。 |
Core | GA |
az restore-point collection list-all |
取得訂用帳戶中的還原點集合清單。 在回應中使用 nextLink 屬性來取得還原點集合的下一頁。 請執行此動作,直到 nextLink 不是 Null,以擷取所有還原點集合。 |
Core | GA |
az restore-point collection show |
取得還原點集合。 |
Core | GA |
az restore-point collection update |
更新還原點集合。 |
Core | GA |
az restore-point collection wait |
將 CLI 置於等候狀態,直到符合還原點集合的條件為止。 |
Core | GA |
az restore-point create |
建立還原點。 不允許更新現有還原點的屬性。 |
Core | GA |
az restore-point delete |
刪除還原點。 |
Core | GA |
az restore-point show |
取得還原點。 |
Core | GA |
az restore-point wait |
將 CLI 置於等候狀態,直到符合還原點的條件為止。 |
Core | GA |
az restore-point create
建立還原點。 不允許更新現有還原點的屬性。
az restore-point create --collection-name
--name --restore-point-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"
必要參數
還原點集合的名稱。
還原點的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
還原點的一致性模式。 可以在建立還原點時於輸入中指定。 目前,只有 CrashConsistent 會接受為有效的輸入。 如需詳細資訊,請參閱 https://aka.ms/RestorePoints。
屬性 | 值 |
---|---|
接受的值: | ApplicationConsistent, CrashConsistent, FileSystemConsistent |
客戶受控數據磁碟加密集資源標識碼。
用來加密數據磁碟還原點數據的金鑰類型。
屬性 | 值 |
---|---|
接受的值: | EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, EncryptionAtRestWithPlatformKey |
客戶想要從還原點排除的磁碟資源標識符清單。 如果未指定任何磁碟,則會包含所有磁碟。
使用量:--exclude-disks XX XX 標識符:以 /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... 格式的 ARM 資源標識符您可以使用多個 --exclude-disks 自變數來指定多個動作。
請勿等候長時間執行的作業完成。
屬性 | 值 |
---|---|
預設值: | False |
客戶受控 OS 磁碟加密集資源標識碼。
用來加密OS磁碟還原點數據的金鑰類型。
屬性 | 值 |
---|---|
接受的值: | EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, EncryptionAtRestWithPlatformKey |
源數據磁碟的資源標識碼。
來源OS磁碟的資源標識碼。
需要建立複本的來源還原點資源標識碼。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az restore-point delete
刪除還原點。
az restore-point delete [--collection-name --restore-point-collection-name]
[--ids]
[--name --restore-point-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--yes]
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
還原點集合的名稱。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
還原點的名稱。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
屬性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
請勿提示確認。
屬性 | 值 |
---|---|
預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az restore-point show
取得還原點。
az restore-point show --collection-name
--name --restore-point-name
--resource-group
[--instance-view]
範例
取得還原點
az restore-point show --resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName"
必要參數
還原點集合的名稱。
還原點的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
顯示還原點的實例檢視。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az restore-point wait
將 CLI 置於等候狀態,直到符合還原點的條件為止。
az restore-point wait --collection-name
--name --restore-point-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
必要參數
還原點集合的名稱。
還原點的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
請等候在 'Succeeded' 使用 'provisioningState' 建立。
屬性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
預設值: | False |
等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
屬性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
等到刪除為止。
屬性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
預設值: | False |
等候資源存在。
屬性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
預設值: | False |
要套用至作業的展開表達式。 'InstanceView' 會擷取還原點運行時間狀態的相關信息。 'instanceView' 預設值為 None。
輪詢間隔以秒為單位。
屬性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
預設值: | 30 |
以秒為單位的等候上限。
屬性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
預設值: | 3600 |
等到 provisioningState 更新為 'Succeeded'。
屬性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |