I guess it was just a matter of time for me to write my first “Azure” post since I’ve joined Microsoft. As I am starting to dig my way through the platform and exploring BC/DR related areas, I am very happy with how easy it is to perform Azure VM backup and restore with no 3rd parties what so ever.
A bit of background…
So you have an Azure VM up and running, that’s nice but just the fact it’s in the cloud doesn’t mean you have a backup for it. The nice thing about Azure VM backup and restore is that it does not require any agent installation (unlike on-prem to Azure backup). Moreover, it’s a very “easy going” process for both the backup and the restore and the initial configurations are very straight forward – isn’t that what you would have expected?!
- Azure subscription – dah! 😛
- Create a backup vault – we will get to do that in just a sec…
Currently, most of this step by step guide will leverage the Classic Azure portal since the “Backup & Restore” functionalities are yet to exist in the new Preview portal.
Creating a Backup Vault
In the preview portal, go to the Marketplace, click “new” and search for “backup”. Hitting the “Create” button will redirect you to the classic portal.
Give your Vault a name and hit “Create”. It will take a few seconds and you’re done.
Configure Backup Policy
The first nice thing you will notice is the “Quick Start” screen which will point you in a very intuitive manner to the next steps, depending on what you are trying to achieve.
As this post is about backup and restore Azure VMs, I will go and start with discovering and registering my virtual machines into the vault.
Select the VMs you want to register. This doesn’t mean that those VMs will be under the same backup policy (which we will configure in a few steps), this only register them and make them available for later configurations.
Just to keep things simple, let’s include both VMs for protection and as members under the same policy. Hit the “Protect” button and select your VMs.
Give your policy a name, select the backup frequency and configure the retention. This can be changed later on, no worries.
On the bottom of the portal you see the status of operations.
At the Dashboard tab you can see a clean usage overview.
Run a VM Backup
Although we have it already scheduled as part of our policy, let’s “test drive” the backup. In the “Protected Items” tab, select a VM and hit the “Backup Now” button.
In the “Jobs” tab you can see that a backup is being performed.
In my case, the initial backup took 15 minutes to complete.
Since my scheduled daily backup started at the same time my initiated backup was in progress, I have a failed backup operation on my list as well which gives me a nice and intuitive description.
Run a VM Restore
Once we have our first backup recover point for the VM, let’s test the recovery. Select your VM from the “Protected Items” tab and hit the Restore button.
Since I only have one recovery point, I will go ahead and select it.
One thing you should know before moving on is that when the first backup is performed, a new storage account is automatically created in Azure.
The name for this account is unique and for some reason it was given the same name as my first VM – kinda’ funky.
At this point, you can restore your VM as a new virtual machine AKA “Cloud Service” (like in the screenshot) or replace the original VM – your choice depending on what you are trying to achieve.
Map the VNet and the subnet and continue.
A restore process will start which took 18 minutes in my case.
After the restore has finished, the VM will be powered on and will be available for management and day-2 operations.
This is working – simple as that. The fact that you have a built-in IaaS service such as backup and restore is great and the ease of operations makes it very easy to digest.