VM restore points using APIs
By: Date: 20/12/2023 Categories: azure Tags:

You may apply granular backup and retention settings with ease by using the Azure VM restoration point APIs. For virtual machines (VMs) running Linux or Windows, VM restoration points offer file system consistency and application consistency, respectively.

The APIs allow you to establish restore points for your source virtual machine in different regions or in the same region. Existing virtual machine restore points can also be copied between regions.

Required conditions

  1. VM restore points have specific requirements. Learn more about them.
  2. Before creating a restore point, consider the limitations.

Set up VM restore points

The procedures for creating virtual machine restore points using the Azure Compute REST APIs are described in the following sections.

Further details are available in the documentation for PowerShell, Restore Points, and Restore Point Collections API.

Step 1: Creating a collection of VM restore points

Make a restore point collection first before creating virtual machine restore points. All of a particular virtual machine’s restore points are contained in a restore point collection. VM restore points can be created in the same region as the virtual machine (VM) or in a different region, depending on your needs. Make use of the Create or Update API for the restore point collection in order to initiate the creation of the collection.

  • Provide the VM’s region in the request body’s location attribute if you’re establishing restore point collection in the same region as the VM.
  • If the restore point collection is being created in a different area than the virtual machine (VM), you should indicate in the location property the target region for the collection as well as the source restore point collection’s ARM resource ID in the request body.

Step 2: Restore a VM by creating a restore point

Making a virtual machine restore point inside the restore point collection comes next after creating the restore point collection. See the Restore Points – Create API documentation for additional details on creating restore points. The “consistencyMode” property in the creation request needs to be set to “CrashConsistent” in order to create crash consistent restore points (in preview).

Step 3: Keep track of the creation of the VM restore point

It will just take a few seconds for your local region’s restore point to be created. It will take a much longer to create scenarios that incorporate cross-region restore points. Use the instructions in Get restore point copy or replication status to monitor the status of the creation activity. This only applies to situations in which the source virtual machine (VM) and the restore points are built in different regions.

Refer- API-based VM restore points