你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az restore-point

使用 res 管理还原点。

命令

名称 说明 类型 状态
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

客户托管的数据磁盘加密集资源 ID。

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

用于加密数据磁盘还原点数据的密钥类型。

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

客户希望从还原点中排除的磁盘资源 ID 列表。 如果未指定任何磁盘,将包括所有磁盘。

用法:--exclude-disks XX ID:/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...可以使用多个 --exclude-disks 参数指定多个操作。

--no-wait

不等待长时间运行的操作完成。

默认值: False
--os-restore-point-encryption-set

客户管理的 OS 磁盘加密集资源 ID。

--os-restore-point-encryption-type

用于加密 OS 磁盘还原点数据的密钥类型。

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

源数据磁盘的资源 ID。

--source-os-resource

源 OS 磁盘的资源 ID。

--source-restore-point

需要从中创建副本的源还原点的资源 ID。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 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

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

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

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。