The New Easy Way to Backup Azure Virtual Machines

Microsoft-Azure-cloud-hero
In this post, I’ll show how you can use the new mechanism to enable backup of Azure IaaS virtual machines, which reduces the amount of clicking that you will need to do in the Azure Portal.
 

 

Recovery Services Vault

The Recovery Services Vault (RSV) is the storage and management resource that is the center of all things Azure Backup, whether you are working on-premises or with virtual machines in Azure. To do anything with Azure Backup, you must first create an RSV. Normal practice would then be to create a backup policy, defining when backups take place and how long they are retained for.

Configuring the policy for backing up Azure VMs [Image Credit: Aidan Finn]
Configuring the policy for backing up Azure VMs [Image Credit: Aidan Finn]
Then, continuing to work in the RSV, you would associate virtual machines with the policy.
Select the Azure VMs to backup [Image Credit: Aidan Finn]
Select the Azure VMs to backup [Image Credit: Aidan Finn]

Working with Virtual Machines

The problem with a RSV-centric administration is that all Azure Backup work needs to be done in the RSV; this will probably be a distraction when you are working on deploying an application. I firmly believe that backup should be something I work with as little as possible; I want to turn it on, and in the best possible version of this universe, I never look at it again. Of course, I will have to do restores from time to time, but day-to-day administration of the backup should be zero. So the last thing I want, when I am focusing on designing, deploying, configuring, and securing a virtual machine-based service, is to have to jump to another browser tab or a blade in the Azure Portal to associate a virtual machine with a backup policy, and then lose track of whatever it was that I was doing.

Enable Backup from the Virtual Machine

The Azure Portal changed recently to add a Backup option in the settings of a virtual machine. The first time that you click this option, the Enable Backup blade will appear and allow you to create a new RSV and backup policy. You can change the default RSV name and customize the backup policy to suit your needs:

  • The name of the backup policy
  • When backups will run
  • How backups are retained by Azure Backup

Enabling Azure virtual machine backup for the first time [Image Credit: Aidan Finn]
Enabling Azure virtual machine backup for the first time [Image Credit: Aidan Finn]
If you save the changes:

  • The RSV is created in the same resource group as the virtual machine
  • The backup policy is created
  • The backup policy is associated with the virtual machine

If you wish to create a central RSV in another resource group, then you should manually create that RSV beforehand.
Let’s assume that you have an RSV and a backup policy already in place, either created beforehand in another resource group or with another virtual machine (as above). To enable backup for additional virtual machines, we only need to do the following:

  1. Open the settings of the virtual machine
  2. Click Backup
  3. Select the existing recovery services vault
  4. Select the existing backup policy
  5. Click Enable Backup

That’s a total of 9 clicks, without ever leaving the virtual machine or the resource group.

Managing Backup

You do not need to return to the recovery services vault to manage backups of a virtual machine. You can open Backup in the settings of the machine, and have access to the following backup actions:

  • Settings: Change the backup policy association.
  • Backup now: Manually trigger a backup.
  • Restore VM: Restore from a backup of this VM.
  • File recovery (Preview): A cool new preview feature where you can restore a file from inside of the protected machine.
  • Stop backup: Stop protecting the machine – you can choose to retain existing backups.
  • Resume backup: Resume regular protection of the machine.
  • Delete backup data: Delete any retained backups after stopping protection of the virtual machine.

Note that monitoring and alerting continues to be managed from a central point in the RSV.