Примечание
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
This article explains how to copy and restore a VM from a VM restore point and track the progress of the copy operation. This article also explains how to create a disk from a disk restore point and to create a shared access signature for a disk.
Copy a VM restore point between regions
The VM restore point APIs can be used to restore a VM in a different region than the source VM. Выполните следующие действия.
Step 1: Create a destination VM restore point collection
To copy an existing VM restore point from one region to another, your first step is to create a restore point collection in the target or destination region. To do this, reference the restore point collection from the source region as detailed in Create a VM restore point collection.
New-AzRestorePointCollection `
-ResourceGroupName 'myResourceGroup' `
-Name 'myRPCollection' `
-Location 'WestUS' `
-RestorePointCollectionId '/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RG>/providers/Microsoft.Compute/restorePointCollections/<SOURCE RESTORE POINT COLLECTION>'
Step 2: Create the destination VM restore point
After the restore point collection is created, trigger the creation of a restore point in the target restore point collection. Ensure that you've referenced the restore point in the source region that you want to copy and specified the source restore point's identifier in the request body. The source VM's location is inferred from the target restore point collection in which the restore point is being created.
See the Restore Points - Create API documentation to create a RestorePoint
.
New-AzRestorePoint `
-ResourceGroupName 'myResourceGroup' `
-RestorePointCollectionName 'myRPCollection'
-Name 'myRestorePoint'
Step 3: Track copy status
To track the status of the copy operation, follow the guidance in the Get restore point copy or replication status section below. This is only applicable for scenarios where the restore points are copied to a different region than the source VM.
Get-AzRestorePoint `
-ResourceGroupName 'myResourceGroup' `
-RestorePointCollectionName 'myRPCollection'
-Name 'myRestorePoint'
Get restore point copy or replication status
Копирование первой точки восстановления виртуальной машины в другой регион является длительной операцией. Точку восстановления виртуальной машины можно использовать для восстановления виртуальной машины только после завершения операции для всех точек восстановления диска. Чтобы отслеживать состояние операции, вызовите Restore Point - Get API на целевой точке восстановления виртуальной машины и добавьте параметр instanceView
. Возврат будет включать процент данных, скопированных во время запроса.
Во время создания точки восстановления ProvisioningState
будет отображаться как Creating
в ответе. If creation fails, ProvisioningState
is set to Failed
.
Create a disk using disk restore points
You can use the VM restore points APIs to restore a VM disk, which can then be used to create a new VM. Выполните следующие действия.
Step 1: Retrieve disk restore point identifiers
Call the Restore Point Collections - Get API on the restore point collection to get access to associated restore points and their IDs. Each VM restore point will in turn contain individual disk restore point identifiers.
Step 2: Create a disk
After you have the list of disk restore point IDs, you can use the Disks - Create Or Update API to create a disk from the disk restore points. You can choose a zone while creating the disk. The zone can be different from zone in which the disk restore point exists.
Restore a VM with a restore point
To restore a full VM from a VM restore point, you must restore individual disks from each disk restore point. This process is described in the Create a disk section. After you restore all the disks, create a new VM and attach the restored disks to the new VM. You can also use the ARM template to restore a full VM along with all the disks.
Get a shared access signature for a disk
To create a Shared Access Signature (SAS) for a disk within a VM restore point, pass the ID of the disk restore points via the BeginGetAccess
API. If no active SAS exists on the restore point snapshot, a new SAS is created. The new SAS URL is returned in the response. If an active SAS already exists, the SAS duration is extended, and the pre-existing SAS URL is returned in the response.
For more information about granting access to snapshots, see the Grant Access API documentation.
Дальнейшие действия
Дополнительные сведения о параметрах резервного копирования и восстановления виртуальных машин в Azure.