Azure User Group Nepal

Learn and understand the cloud technology using Microsoft Azure platform to adopt it

Azure VM Backup – Recovery Service Vault

Author: Sakaldeep

July 31, 2017

Why need Azure VM Backup

We should have a contingency plan for unplanned and planned downtime for VMs running on Azure. There are many solutions such as run VMs in Availability Set, ASR(Azure Site Recovery), Azure VM Backup(Recovery Service Vault). Some solution will give high availability, some DR and some will simply backup. You can choose the solution based on your business need, especially RPO and RTO.

Azure VM Backup does image level backup of VM and stores the entire image on Recovery Service Vault. The image can be restored as a VM if you want VM level recovery or it can be mounted as a drive if you want to file/folder level recovery. You can do a daily backup, weekly backup and monthly backup with the retention period of 99 years. More than one daily backup is not available now, if you want more than one restoration point per day then you may go for Azure Backup Server which has no license cost, simply you need to put a server. This solution might not fit for production VMs but it will be a good solution for development and other auxiliary servers.

In this scenario VM has already created, see how to create VM using PowerShell.

High-Level Configuration Process

  1. Prepare Recovery Service Vault and Backup policy
  2. Backup VM
  3. Restore entire VM
  4. Restore only files and folders

Prepare Recovery Service Vault and Backup policy

Here, we have a VM running and we want to backup it to recovery service vault.

Click on VM and it will show VM information as shown below. Click on Backup button.

Once you click on Backup button, it will navigate to Enable backup page and will ask for Recovery Service Vault  name and Backup policy details. we are creating new recovery service vault, ProdVmVaultwill be name of newly created recovery vault.

After that click on Backup policy and define your backup policy as per your requirement.

Now, click on Enable Backup to create recovery service vault with defined backup policy.



Backup VM

Once recovery service vault will be created, you will navigate to page shown as below. To backup the VM click on Backup now button.

Provide retention date for the backup and click on the Backup button.

we can see the status of the backup process under Backup jobs.

Backup has successfully completed.

To verify the backup by step shown below.

we can see ProdVmVault has created under recovery service vault.

Click on ProdVmVault->Backup items under protected items, we can see one azure VM is there.

Restore the VM

When we click on the VM, it will give you an option for recovery. As we can see there is Restore VM and File Recovery options. Let’s do VM level recovery first.

It will ask to select restoration point, here we have only one restoration point that is application consistent.

Provide restore configuration details such as the name of target VM, resource group, virtual network, subnet, and storage account.

All required information was provided, now click on the Restore button to start the restoration process.

We can see the restoration task in progress under Backup jobs.

Restoration task has successfully completed and VM is created with the backup image. Your VM is ready to use but it will have different public IP. If you have a public DNS record for the server then you need to change it manually.

 

File/Folder Recovery

If you don’t want to recover the entire VM, you only need to recover data then click on File Recovery.

It will give a script that will mount all the drives to the local computers. You can run the script to any server/computer. The script will ask for a password to connect to recovery service vault. Download the script as shown below.

Run the script as Administrator, it will trigger PowerShell and ask for a password to connect.

Here, D and H drive has mounted to the local computer and you can recover your data.

We can see file and folder of the drive here, simply we can copy and paste to any location.

The mounted drive will be automatically dismounted after 12 hours or you can discount it anytime from the portal as shown below.

Azure VM Backup is a solution to protect your VMs running on Azure with some pros and corns. See the Azure Backup Pricing page for information about Backup Pricing.

Total visits : 144