
Backing up your Azure Virtual Machines
Azure Virtual Machines (VMs) are great. They’re easy to setup, maintain, and leverage the many advantages of the cloud. Although storage devices of the VMs have redundancy you are still susceptible to a VM not booting up or becoming inaccessible due to corruption or a Windows update on the VM. When that becomes your issue the disk redundancy won’t help you and your stuck with a complicated and time consuming process of rebuilding the VM.
To save yourself from this rebuilding process Azure has a backup feature called Recovery Services. Recovery Services allows you to create a “Backup Vault” that you can attach VMs to in order to schedule full VM backups. The service allows you to create unique backup schedules and retention policies per Backup Vault. With this in place it’s a simple matter of accessing the Azure Portal and restoring the last appropriate VM backup, avoiding the painful hassle of creating a new VM; setting up all the services, updates, and restoring any lost data. Recovery Services does it all for you. You still want to augment VM backups with normal data backups for those cases where the age of the last good VM backup and your data backup are not the same.
I’m going to cover, in brief, the steps to setup a Backup Vault and assign a backup schedule to a VM.
Login to your Azure Portal and locate the Recovery Services section on the left
Create a new Backup Vault by selecting the “New” button at the bottom left. Then Recovery Services>>Backup Vault>>Quick Create
Give your Backup Vault a name and then select the Region and Subscription. If you are managing multiple subscriptions in Azure make sure you select the same subscription as the VM is in or you won’t be able to see it.
Wait while the Backup Vault is created
Click on the Backup Vault name and you will be brought to the Vault’s Dashboard
Now you need to Discover and Register the VMs you want to backup. Select “Registered Items” from the top menu and then “Discover” at the bottom task bar.
Once the Discover process is complete you can “Register” a VM by selecting “Register” on the bottom task bar. In the window select the VMs you want to protect.
It will take a moment to register
Now that the VM is registered you need to setup the backup schedule by protecting it. Select “Protect” from the bottom task bar. Then select the VM you want to protect.
Then proceed to page 2 and create a new policy with the frequency you want for the backups.
Proceed to page 3 and select the Retention rules for your backups. You have a lot of choices here and you can always go back and tweak them.
Select the checkmark and you’re done!
After your Backup Vault is created you can continue to monitor and manage it via the Recovery Services Dashboard. You can add/remove VMs, change the policy, change retention, and delete the vault (which also deletes all backups).
To recover a VM you go to “Protected Items”, select the VM in the list and then “Restore” from the bottom task bar. A window will pop up and you can select which backup to use for the restore.
The restore process will actually create a new VM from the backup. You can then decommission the bad VM and use the newly restored VM.
For more information Backups in Azure visit the Azure Backup Services site and the links below.
The following Microsoft video will walk through the entire process:
The following links have more information on Azure Recovery Services and Backups