Azure Backup for Workload in Azure Virtual Machines

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check Bicep Version

Deploy To Azure Deploy To Azure US Gov Visualize

This template creates a Recovery Services Vault and a Workload specific Backup Policy. Registers VM with Azure Backup service and Configures Protection.

The Backup service is Microsoft's born in the cloud backup solution to backup data that's located on-premises and in Azure. It replaces your existing on-premises or offsite backup solution with a reliable, secure and cost competitive cloud backup solution. It also provides the flexibility of protecting your assets running in the cloud. You can backup Windows Servers, Windows Clients, Hyper-V VMs, Microsoft workloads, Azure Virtual Machines (Windows and Linux) with its in-built resilience and high SLAs. Learn more.


You need to have VM with SQL Server. Sample template for VM with SQL Server can be found under prereqs directory.

Steps (Operations performed in Template)

Once you have VM and Database available to be backed up.

  1. Create Recovery Services Vault (Create new or use existing)
  2. Create Workload Backup Policy (Create new or use existing)
  3. Register VM with Backup Service (Installs Backup VM Extension)
  4. Configure Protection

Make use of conditional property in the template to toggle between new vs existing vault and policy. Azure Backup for SQL Server in Azure Virtual Machines

In order to delete the recovery services vault, you first need to stop protection to any existing backup item (e.g. database) and unregister the virtual machine containing the workload. You may refer below documentation:

  • [Stop backup and delete backup data](
  • [Unregister VM](
  • [Delete Recovery Services Vault](

To know more about Azure Backup for SQL Server in Azure Virtual Machines Click Here

Tags: Microsoft.RecoveryServices/vaults, Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers, Microsoft.RecoveryServices/vaults/backupPolicies, Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems, Microsoft.Compute/virtualMachines, Microsoft.SqlVirtualMachine/sqlVirtualMachines, Microsoft.Network/virtualNetworks, Microsoft.Network/networkInterfaces, Microsoft.Network/publicIPAddresses, Microsoft.Network/networkSecurityGroups