If you have been reading this series through the first two posts, then by now you are familiar with ARM, VM and networking templates, and the new Azure Portal. Maybe you have even tried it for yourself, and created some new VMs using templates, or created a new network with a VPN gateway. If so, then in a week if you decide to delete all that and start over creating it again, with ARM templates it is SO easy to do!

But in some cases, you may create and use a VM for something more permanent, and at that point you will start to think about Azure backups. If you read Part 1 of my posts on ARM, then you’ll remember there is a caveat to ARM VMs, at least for right now. Azure automatic backups only work for ‘Classic’ VMs, NOT those created using ARM templates.  IaaS v1 VMs are fine, just not v2. So for now, use those template VMs as the machines you can blow away and start over, and use classic VMs for anything you need to automatically backup.

Creating a Classic VM

So, what’s different about creating a classic VM? Well, if you followed the first example in my previous post on how to create VMs using the Azure portal, then not much! Just choose Classic for the VM creation, and make sure to choose Classic in the dropdown for VM type. That’s it.

2016-01-26 18_06_35-SQL Server 2008 R2 SP3 Enterprise on Windows Server 2008 R2 - Microsoft Azure

Adding Backup Vault

We will also need an Azure Backup Vault. This part we actually can create with an ARM template. We can just launch the quickstart template directly from here. You can also edit the template before launch if the default setup isn’t right for you. But for a simple backup, it is equivalent to a quick-configure using the Azure Management site. Once you Create the template, you will see it on the Dashboard deploying template for a moment before the backup vault is created.

2016-01-26 17_30_45-azure-quickstart-templates_101-backup-vault-create at master · Azure_azure-quick    2016-01-26 23_05_09-Dashboard - Microsoft Azure

Once the vault is created, you will see it in a resource group in your Azure portal. Notice the little icon next to the vault name. This means that the resource cannot be edited in the new portal, and clicking the item will return you to manage.azure.com. I’m sure this will change in the future, but for now we have to do the rest of our backup configuration from outside the portal.

2016-01-26 23_07_15-Settings - Microsoft Azure

Adding VMs to Backup Vault

It make take a few minutes for that link to work. Then, we can add our classic VMs to the Backup Vault. First, let the vault Discover any available VMs.

2016-01-26 17_57_41-Recovery Services - Microsoft Azure

Then select Register and you will see a list of compatible VMs. If your VM of choice is not in the list, it’s likely your VM was created with ARM. Scroll up to read how to create a Classic VM instead.

2016-01-26 17_58_27-Recovery Services - Microsoft Azure

Once registered, we can select the VM to protect and configure the protection. Most of these steps are pretty self-explanatory for this part. You can use the Default Policy in most cases, or configure more specifically with a custom policy.

2016-01-26 17_59_19-Recovery Services - Microsoft Azure 2016-01-26 17_59_54-Recovery Services - Microsoft Azure

Now your VM will be backed up on schedule. You may want to trigger the initial backup immediately as I did here. Then you can view the backup under Jobs. Remember, the VM does not need to shut down in order to backup to the Vault.

Restoring a VM

Now that we have a backup, how can we use it to restore the VM? Just a few simple steps and you can use the recovery point to restore the original VM or make an exact copy. Choose Restore from the dashboard:

2016-01-26 23_44_05-Microsoft SQL Server Management Studio

You will be prompted to select a recovery point and give a name for the restore instance. Azure is also warning me that there may be cost implications of creating this VM (as with any VM creation). You will be able to see the restore operation under Jobs.

2016-01-26 23_44_34-Recovery Services - Microsoft Azure  2016-01-26 23_45_17-Recovery Services - Microsoft Azure

And that’s it! Now I have 2 copies of my classic Azure VM, and my VM is protected with the Azure Backup Vault if I want to (or have to) restore it again.

The following two tabs change content below.