Azure Policy


How to use Azure Policy to automatically backup your IaaS VMs

In this blogpost you see how easy it is to automatically configure Azure Backup to protect your Azure IaaS workload.

For this blogpost I’m using the Azure portal, configuring using CLI and templates is ofcourse also possible. Open your azure portal and go to the Policy pane :

Policy01

Go to defintions, select the scope of your subscription and select only Backup from the Category option :

Policy02

 

You notice the Configure backup on VMs of a location to an excisting central Vault in the samen location option. Open this default policy. Choose the Assign option :

Now let’s fill in the Scope (Subscription of the Policy). This is the subscription name/ID you’re linking to this specific Azure Policy. You can also specify a specific Resource Group or leave this blank when you wish to apply this policy to all Resource Groups in this Subscription.

Ok…. now we have the possibility to add  exclusions (when applicable), a custom name and a description :

Let’s go through the other panes and fill in the necessary parameters. Choose the Location/Region, the Backup Policy name etc.

Servers already deployed can be remediated and have the Azure backup policy applied. So this applies for already created IaaS VMs as also for existing VMs.

Choose to create the policy. Wait some time. Now go to the Azure Policy pane and see your Policy results :