Share via


az dataprotection backup-instance restore

注意

此參考是 Azure CLI 的數據保護延伸模組的一部分(2.57.0 版或更高版本)。 擴充功能會在您第一次執行 az dataprotection backup-instance restore 命令時自動安裝。 深入了解擴充功能。

從備份保存庫中的恢復點還原備份的實例。

命令

名稱 Description 類型 狀態
az dataprotection backup-instance restore initialize-for-data-recovery

初始化還原要求物件,以復原備份保存庫中的所有備份數據。

副檔名 GA
az dataprotection backup-instance restore initialize-for-data-recovery-as-files

初始化還原要求物件,以將所有備份的數據復原為備份保存庫中的檔案。

副檔名 GA
az dataprotection backup-instance restore initialize-for-item-recovery

初始化還原要求物件,以復原備份保存庫中備份數據的指定專案。

副檔名 GA
az dataprotection backup-instance restore trigger

觸發 BackupInstance 的還原。

副檔名 GA

az dataprotection backup-instance restore initialize-for-data-recovery

初始化還原要求物件,以復原備份保存庫中的所有備份數據。

az dataprotection backup-instance restore initialize-for-data-recovery --datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}
                                                                       --restore-location
                                                                       --source-datastore {ArchiveStore, OperationalStore, VaultStore}
                                                                       [--backup-instance-id]
                                                                       [--point-in-time]
                                                                       [--recovery-point-id]
                                                                       [--rehydration-duration]
                                                                       [--rehydration-priority {Standard}]
                                                                       [--restore-configuration]
                                                                       [--secret-store-type {AzureKeyVault}]
                                                                       [--secret-store-uri]
                                                                       [--target-resource-id]

範例

初始化 Azure 磁碟備份實例的還原要求

az dataprotection backup-instance restore initialize-for-data-recovery --datasource-type AzureDisk --restore-location centraluseuap --source-datastore OperationalStore --target-resource-id {restore_disk_id} --recovery-point-id b7e6f082-b310-11eb-8f55-9cfce85d4fae

必要參數

--datasource-type

指定數據來源類型。

接受的值: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService
--restore-location

指定還原位置。

--source-datastore

指定指定恢復點或時間點的數據存放區類型。

接受的值: ArchiveStore, OperationalStore, VaultStore

選擇性參數

--backup-instance-id

指定備份實例識別碼。

--point-in-time

指定時間點,以 UTC 還原數據(yyyy-mm-ddTHH:MM:SS)。

--recovery-point-id

指定將用於還原數據的恢復點標識碼。

--rehydration-duration

指定解除凍結還原的解除凍結持續時間。

預設值: 15
--rehydration-priority

指定解除凍結還原的解除凍結優先順序。

接受的值: Standard
--restore-configuration

還原組態以進行還原。 使用此參數搭配 AzureKubernetesService 還原。

--secret-store-type

指定要用於驗證的秘密存放區類型。

接受的值: AzureKeyVault
--secret-store-uri

指定要用於驗證的秘密存放區 URI。

--target-resource-id

指定要還原數據的資源識別碼。

全域參數
--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 dataprotection backup-instance restore initialize-for-data-recovery-as-files

初始化還原要求物件,以將所有備份的數據復原為備份保存庫中的檔案。

az dataprotection backup-instance restore initialize-for-data-recovery-as-files --datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}
                                                                                --restore-location
                                                                                --source-datastore {ArchiveStore, OperationalStore, VaultStore}
                                                                                --target-blob-container-url
                                                                                --target-file-name
                                                                                [--point-in-time]
                                                                                [--recovery-point-id]
                                                                                [--rehydration-duration]
                                                                                [--rehydration-priority {Standard}]
                                                                                [--target-resource-id]

範例

將 azure 資料庫的還原要求初始化為 postgresql 伺服器備份實例的檔案

az dataprotection backup-instance restore initialize-for-data-recovery-as-files --datasource-type AzureDatabaseForPostgreSQL --restore-location centraluseuap --source-datastore VaultStore --target-blob-container-url {target_blob_container_url} --target-file-name {target_file_name} --recovery-point-id 9a4ab128e2d441d6a575ecd85903bd81

必要參數

--datasource-type

指定數據來源類型。

接受的值: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService
--restore-location

指定還原位置。

--source-datastore

指定指定恢復點或時間點的數據存放區類型。

接受的值: ArchiveStore, OperationalStore, VaultStore
--target-blob-container-url

指定要還原數據的 Blob 容器 URL。

--target-file-name

指定要還原數據的檔名。

選擇性參數

--point-in-time

指定時間點,以 UTC 還原數據(yyyy-mm-ddTHH:MM:SS)。

--recovery-point-id

指定將用於還原數據的恢復點標識碼。

--rehydration-duration

指定解除凍結還原的解除凍結持續時間。

預設值: 15
--rehydration-priority

指定解除凍結還原的解除凍結優先順序。

接受的值: Standard
--target-resource-id

指定將還原數據的目標記憶體容器 ARM 識別碼,以檔案的形式還原至另一個訂用帳戶所需的數據。

全域參數
--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 dataprotection backup-instance restore initialize-for-item-recovery

初始化還原要求物件,以復原備份保存庫中備份數據的指定專案。

az dataprotection backup-instance restore initialize-for-item-recovery --datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}
                                                                       --restore-location
                                                                       --source-datastore {ArchiveStore, OperationalStore, VaultStore}
                                                                       [--backup-instance-id]
                                                                       [--container-list]
                                                                       [--from-prefix-pattern]
                                                                       [--point-in-time]
                                                                       [--recovery-point-id]
                                                                       [--restore-configuration]
                                                                       [--target-resource-id]
                                                                       [--to-prefix-pattern]
                                                                       [--vaulted-blob-prefix]

範例

初始化 Azure Blob 備份實例的還原要求

az dataprotection backup-instance restore initialize-for-item-recovery --datasource-type AzureBlob --restore-location centraluseuap --source-datastore OperationalStore --backup-instance-id {backup_instance_id}  --point-in-time 2021-05-26T15:00:00 --container-list container1 container2

必要參數

--datasource-type

指定數據來源類型。

接受的值: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService
--restore-location

指定還原位置。

--source-datastore

指定指定恢復點或時間點的數據存放區類型。

接受的值: ArchiveStore, OperationalStore, VaultStore

選擇性參數

--backup-instance-id

指定備份實例識別碼。

--container-list

指定要還原的容器清單。

--from-prefix-pattern

指定開始範圍的前置詞模式。

--point-in-time

指定時間點,以 UTC 還原數據(yyyy-mm-ddTHH:MM:SS)。

--recovery-point-id

指定將用於還原數據的恢復點標識碼。

--restore-configuration

還原組態以進行還原。 使用此參數搭配 AzureKubernetesService 還原。

--target-resource-id

指定要還原數據的資源識別碼。

--to-prefix-pattern

指定結束範圍的前置詞模式。

--vaulted-blob-prefix --vaulted-blob-prefix-pattern

指定保存庫 Blob 的前置詞模式。

全域參數
--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 dataprotection backup-instance restore trigger

觸發 BackupInstance 的還原。

az dataprotection backup-instance restore trigger --backup-instance-name
                                                  --restore-request-object
                                                  [--ids]
                                                  [--no-wait]
                                                  [--operation-requests]
                                                  [--resource-group]
                                                  [--subscription]
                                                  [--tenant-id]
                                                  [--use-secondary-region {false, true}]
                                                  [--vault-name]

範例

觸發還原作業

az dataprotection backup-instance restore trigger -g sample_rg --vault-name sample_backupvault --backup-instance-name sample_biname-fd53a211-3f3e-4c7e-ba45-81050e27c0be  --restore-request-object restorerequestobject.json

觸發跨區域還原作業

az dataprotection backup-instance restore trigger -g sample_rg --vault-name sample_backupvault --backup-instance-name sample_biname-fd53a211-3f3e-4c7e-ba45-81050e27c0be  --restore-request-object restorerequestobject.json --use-secondary-region

必要參數

--backup-instance-name --name -n

備份實例名稱。

--restore-request-object

要求作業的本文。 預期值:json-string/@json-file。

選擇性參數

--ids

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

--no-wait

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

預設值: False
--operation-requests --resource-guard-operation-requests

由 resourceGuard 保護的重要作業要求。

--resource-group -g

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

--subscription

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

--tenant-id

如果保護保存庫的 Resource Guard 存在於不同的租使用者中,則租用戶的標識碼。

--use-secondary-region

使用此旗標從次要區域中的恢復點還原。

接受的值: false, true
--vault-name -v

備份保存庫的名稱。

全域參數
--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 來取得完整偵錯記錄。