Backing up and Restoring VMs on Azure

On Azure, you can prevent unintended loss of data by backing up your virtual machines. Azure allows you to optimize your backup by providing different levels of consistency. Similarly, the data on the virtual machines can be easily restored to a stable state. You can back up a virtual machine using the following two methods:

  • Creating snapshots of the disk
  • Using recovery services vaults

This following sections describe how to create and restore backups using the two mentioned methods.

Backing up and Restoring using Snapshots of Disks

The following sections describe how to create snapshots of disks and recover them on virtual machines. This procedure of backup and recovery is applicable for virtual machines that are created from disks and custom images.

Creating a Snapshot of a Virtual Machine on Azure

To create a snapshot of a virtual machine:

  1. Sign in to the Azure homepage.

  2. On the left pane, select Virtual machines.

    The Virtual machines screen appears.

  3. Select the required virtual machine and click Disks.

    The details of the disk appear.

  4. Select the disk and click Create Snapshot.

    The Create Snapshot screen appears.

    Create Snapshot Screen

  5. Enter the following information:

    • Name: Name of the snapshot
    • Subscription: Subscription account for Azure
  6. Select the required resource group from the Resource group drop-down list.

  7. Select the required account type from the Account type drop-down list.

  8. Click Create.

    The snapshot of the disk is created.

Restoring from a Snapshot on Azure

This section describes the steps to restore a snapshot of a virtual machine on Azure.

Before you begin

Ensure that the snapshot of the machine is taken.

How to restore from a snapshot on Azure

To restore a virtual machine from a snapshot:

  1. On the Azure Dashboard screen, select Virtual Machine.

    The screen displaying the list of all the Azure virtual machines appears.

  2. Select the required virtual machine.

    The screen displaying the details of the virtual machine appears.

  3. On the left pane, under Settings, click Disks.

  4. Click Swap OS Disk.

    The Swap OS Disk screen appears.

  5. Click the Choose disk drop-down list and select the snapshot created.

  6. Enter the confirmation text and click OK.

    The machine is stopped and the disk is successfully swapped.

  7. Restart the virtual machine to verify whether the snapshot is available.

Backing up and Restoring using Recovery Services Vaults

Recovery services vault is an entity that stores backup and recovery points. They enable you to copy the configuration and data from virtual machines. The benefit of using recovery services vaults is that it helps organize your backups and minimize the overhead of management. It comes with enhanced capabilities of backing up data without compromising on data security. These vaults also allow you to create backup polices for virtual machines, thus ensuring integrity and protection. Using recovery services vaults, you can retain recovery points of protected virtual machines to restore them at a later point in time.

For more information about Recovery services vaults, refer to the following link:

https://docs.microsoft.com/en-us/azure/backup/backup-azure-recovery-services-vault-overview

Before you begin

This process of backup and restore is applicable only for virtual machines that are created from a custom image.

Creating Recovery Services Vaults

Before starting with the backup procedure, you must create a recovery services vault.

Before you begin

Ensure that you are aware about the pricing and role-based access before proceeding with the backup.

For more information about the pricing and role-based access, refer to the following links:

To create a recovery services vault:

  1. Sign in to the Azure homepage.

  2. On the Azure Dashboard screen, search Recovery Services vaults.

    The screen displaying all the services vaults appears.

  3. Click Add.

    The Create Recovery Services vault screen appears.

  4. Populate the following fields:

    • Subscription: Account name under which the recovery services vault is created.
    • Resource group: Associate a resource group to the vault.
    • Vault name: Name of the vault.
    • Region: Location where the data for recovery vault must be stored.

    The Welcome to Azure Backup screen appears on the right pane.

  5. Click Review + create .

    The recovery services vault is created.

Backing up Virtual Machine using Recovery Services Vault

This section describes how to create a backup of a virtual machine using a Recovery Services Vault. For more information about the backup, refer to the link, https://docs.microsoft.com/en-us/azure/backup/backup-azure-vm-backup-faq

To create a backup of a virtual machine:

  1. Sign in to the Azure homepage.

  2. On the left pane, select Virtual machines.

    The Virtual machines screen appears.

  3. Select the required virtual machine.

  4. On the left pane, under the Operations tab, click Backup.

    The Welcome to Azure Backup screen appears on the right pane.

  5. From the Recovery Services vault option, choose Select existing and select the required vault.

  6. In the backup policy, you specify the frequency, backup schedule, and so on. From the Choose backup policy option, select a policy from the following options:

    • DailyPolicy: Retain the daily backup taken at 9.00 AM UTC for 180 days.
    • DefaultPolicy: Retain the daily backup taken at 10.30 AM UTC for 30 days.
    • Create backup policy: Customize the backup policy as per your requirements.
  7. Click Enable backup.

    A notification stating that backup is initiated appears.

  8. On the Azure Dashboard screen, search Recovery Services vaults.

    The screen displaying all the services vaults appears.

  9. Select the required services vault.

    The screen displaying the details of the virtual machine appears.

  10. On the center pane, under Protected items, click Backup items.

    The screen displaying the different management types vault appears.

  11. Select the required management type.

    After the backup is completed, the list displays the virtual machine for which the backup was initiated.

Restoring a Virtual Machine using Recovery Services Vaults

In Azure, when restoring a virtual machine using Recovery Services vaults, you have the following two options:

  • Creating a virtual machine: Create a virtual machine with the backed up information.
  • Replacing an existing: Replace an existing disk on the virtual machine with the backed up information.

Restoring by Creating a Virtual Machine

This section describes how to restore a backup on a virtual machine by creating a virtual machine.

Before you begin

Ensure that the backup process for the virtual machine is completed.

How to restore by creating a virtual machine

To restore a virtual machine by creating a virtual machine:

  1. On the Azure Dashboard screen, search Recovery Services vaults.

    The screen displaying all the services vaults appears.

  2. Select the required services vault.

    The screen displaying the details of the services vault appears.

  3. On the center pane, under Protected items, click Backup items.

    The screen displaying the different management types vault appears.

  4. Select the required management type.

    The virtual machines for which backup has been initiated appears.

  5. Select the virtual machine.

    The screen displaying the backup details, and restore points appear.

  6. Click Restore VM.

    The Select Restore point screen appears.

  7. Choose the required restore point and click OK.

    The Restore Configuration screen appears.

  8. If you want to create a virtual machine, click Create new.

    1. Populate the following fields for the respective options:

      • Restore type: Create a new virtual machine without overwriting an existing backup.
      • Virtual machine name: Name for the virtual machine.
      • Resource group: Associate vault to a resource group.
      • Virtual network: Associate vault to a virtual network.
      • Storage account: Associate vault to a storage account.
    2. Click OK.

  9. Click Restore.

    The restore process is initiated. A virtual machine is created with the backed up information.

Restoring a Virtual Machine by Restoring a Disk

This section describes how to restore a backup on a virtual machine by restoring a disk on a virtual machine.

Before you begin

Ensure that the backup process for the virtual machine is completed. Also, ensure that the VM is stopped before performing the restore process.

How to restore a virtual machine by creating a virtual machine

To restore a virtual machine by creating a virtual machine:

  1. On the Azure Dashboard screen, search Recovery Services vaults.

    The screen displaying all the services vaults appears.

  2. Select the required services vault.

    The screen displaying the details of the services vault appears.

  3. On the center pane, under Protected items, click Backup items.

    The screen displaying the different management types vault appears.

  4. Select the required management type.

    The virtual machines for which backup has been initiated appears.

  5. Select the virtual machine.

    The screen displaying the backup details, and restore points appear.

  6. Click Restore VM.

    The Select Restore point screen appears.

  7. Choose the required restore point and click OK.

    The Restore Configuration screen appears.

  8. Click Replace existing.

    1. Populate the following fields:

      • Restore type: Replace the disk from a selected restore point.
      • Staging location: Temporary location used during the restore process.
    2. Click OK.

  9. Click Restore.

    The restore process is initiated. The backup is restored by replacing an existing disk on the machine with the disk containing the backed up information.

Last modified February 7, 2025