A previous post, Backing up Azure VMs in the Azure Portal, showed you how to back up your Azure Resource Manager (ARM) or CSP virtual machines, and this post will show you how to recover a virtual machine using the Azure Portal.
I needed to clean up my lab to save some money so I deleted some virtual machines.I got a notification that the virtual machine was deleted … and noticed the name of the virtual machine. I have a resource group that contains a load balanced web farm that I have been using for experimenting with and for writing articles such as this one. The virtual machine was a part of that lab. I inspected the Azure audit logs and sure enough, I removed the wrong machine. This lab is important to my recent work so I, luckily, back up the virtual machines.
Restore the Virtual Machine
Navigate to (Browse > Recovery Services Vaults) and open the Recovery Services vault that you use to back up your virtual machines. Expand All Settings and select Backup Items. There you should see each virtual machine that was being backed up, along with the last backup status and latest available restore point.
The blade informed me that my missing virtual machine was successfully backed up at 8:08 PM during the previous evening.You can find out more information about a backup by selecting the virtual machine; a blade for that specific machine opens up. There I can see how many restore points are available to me, the oldest one, and the newest one. Click Restore to start restoring the virtual machine.
A new set of blades will open up to walk you through restoring the virtual machine. The first step is to select a restore point. You can use the filter options to shrink the list if you have lots of restore points. For example, you can type in a date or time in Filter Items, or choose between different types of consistency. I selected the most recent restore point from 8:08 PM and clicked OK.Restore Configuration allows me to define where I will restore the machine to. In short, I can restore the machine exactly as it was, create a new machine, or restore it to a new resource group, a new network/subnet, or to a different storage account.
I have no choice – I need to restore my machine exactly as it was before I get fired!The recovery from backup will start once I click the Restore button at the bottom of the Restore blade. I can monitor the restoration either via the Audit log (which has a time delay) or I can monitor the backup job in the Recovery Services vault. To do the latter, open All Settings in the vault and go to Jobs > Backup Jobs. There you should see an In Progress job for the Restore operation. You can expand the job to see more information.
The virtual machine was restored exactly as it was before hand – actually, the disks were restored to the storage account and a new machine (which is just metadata) was created and attached to the disks. The machine was automatically booted up once the restoration was completed, and my bacon was saved from the fire.