Delen via


Quickstart: Create VM restore points using APIs

U kunt uw gegevens beveiligen door regelmatig back-ups te maken. Azure VM restore point APIs are a lightweight option you can use to implement granular backup and retention policies. VM restore points support application consistency for VMs running Windows operating systems and support file system consistency for VMs running Linux operating system.

You can use the APIs to create restore points for your source VM in either the same region, or in other regions. You can also copy existing VM restore points between regions.

Vereiste voorwaarden

  • Learn more about the requirements for a VM restore point.
  • Consider the limitations before creating a restore point.

Create VM restore points

The following sections outline the steps you need to take to create VM restore points with the Azure Compute REST APIs.

You can find more information in the Restore Points, PowerShell, and Restore Point Collections API documentation.

Stap 1: een verzameling vm-herstelpunten maken

Before you create VM restore points, you must create a restore point collection. A restore point collection holds all the restore points for a specific VM. Depending on your needs, you can create VM restore points in the same region as the VM, or in a different region. To create a restore point collection, call the restore point collection's Create or Update API.

  • If you're creating restore point collection in the same region as the VM, then specify the VM's region in the location property of the request body.
  • If you're creating the restore point collection in a different region than the VM, specify the target region for the collection in the location property, but also specify the source restore point collection ARM resource ID in the request body.

To create a restore point collection, call the restore point collection's Create or Update API.

Stap 2: Een VM-herstelpunt maken

After you create the restore point collection, the next step is to create a VM restore point within the restore point collection. For more information about restore point creation, see the Restore Points - Create API documentation. For creating crash consistent restore points (in preview) "consistencyMode" property has to be set to "CrashConsistent" in the creation request.

Hint

To save space and costs, you can exclude any disk from either local region or cross-region VM restore points. To exclude a disk, add its identifier to the excludeDisks property in the request body.

Stap 3: De status bijhouden van het maken van het VM-herstelpunt

Restore point creation in your local region will be completed within a few seconds. Scenarios, which involve the creation of cross-region restore points will take considerably longer. To track the status of the creation operation, follow the guidance in Get restore point copy or replication status. This is only applicable for scenarios where the restore points are created in a different region than the source VM.

Get restore point copy or replication status

Het kopiƫren van het eerste VM-herstelpunt naar een andere regio is een langdurige bewerking. Het VM-herstelpunt kan alleen worden gebruikt om een virtuele machine te herstellen nadat de bewerking is voltooid voor alle schijfherstelpunten. Als u de status van de bewerking wilt bijhouden, gebruikt u de Restore Point - Get API op het herstelpunt van de doel-VM en neemt u de parameter instanceView op. De retour bevat het percentage gegevens dat is gekopieerd op het moment van de aanvraag.

Tijdens het maken van een herstelpunt wordt het ProvisioningState weergegeven als Creating in het antwoord. Als het maken mislukt, wordt ProvisioningState ingesteld op Failed.

Volgende stappen