Manage Azure virtual machine backups
This article provides guidance on managing VM backups, and explains the backup alerts information available in the portal dashboard. The guidance in this article applies to using VMs with Recovery Services vaults. This article does not cover the creation of virtual machines, nor does it explain how to protect virtual machines. For a primer on protecting Azure Resource Manager-deployed VMs in Azure with a Recovery Services vault, see First look: Back up VMs to a Recovery Services vault.
Manage vaults and protected virtual machines
In the Azure portal, the Recovery Services vault dashboard provides access to information about the vault including:
- the most recent backup snapshot, which is also the latest restore point
- the backup policy
- total size of all backup snapshots
- number of virtual machines that are protected with the vault
Many management tasks with a virtual machine backup begin with opening the vault in the dashboard. However, because vaults can be used to protect multiple items (or multiple VMs), to view details about a particular VM, open the vault item dashboard. The following procedure shows you how to open the vault dashboard and then continue to the vault item dashboard. There are "tips" in both procedures that point out how to add the vault and vault item to the Azure dashboard by using the Pin to dashboard command. Pin to dashboard is a way of creating a shortcut to the vault or item. You can also execute common commands from the shortcut.
If you have multiple dashboards and blades open, use the dark-blue slider at the bottom of the window to slide the Azure dashboard back and forth.
Open a Recovery Services vault in the dashboard:
- Sign in to the Azure portal.
On the Hub menu, click Browse and in the list of resources, type Recovery Services. As you begin typing, the list filters based on your input. Click Recovery Services vault.
The list of Recovery Services vaults are displayed.
If you pin a vault to the Azure Dashboard, that vault is immediately accessible when you open the Azure portal. To pin a vault to the dashboard, in the vault list, right-click the vault, and select Pin to dashboard.
From the list of vaults, select the vault to open its dashboard. When you select the vault, the vault dashboard and the Settings blade open. In the following image, the Contoso-vault dashboard is highlighted.
Open a vault item dashboard
In the previous procedure you opened the vault dashboard. To open the vault item dashboard:
In the vault dashboard, on the Backup Items tile, click Azure Virtual Machines.
The Backup Items blade lists the last backup job for each item. In this example, there is one virtual machine, demovm-markgal, protected by this vault.
For ease of access, you can pin a vault item to the Azure Dashboard. To pin a vault item, in the vault item list, right-click the item and select Pin to dashboard.
In the Backup Items blade, click the item to open the vault item dashboard.
The vault item dashboard and its Settings blade open.
From the vault item dashboard, you can accomplish many key management tasks, such as:
- change policies or create a new backup policy
- view restore points, and see their consistency state
- on-demand backup of a virtual machine
- stop protecting virtual machines
- resume protection of a virtual machine
- delete a backup data (or recovery point)
- restore backup disks
For the following procedures, the starting point is the vault item dashboard.
Manage backup policies
On the vault item dashboard, click All Settings to open the Settings blade.
On the Settings blade, click Backup policy to open that blade.
On the blade, the backup frequency and retention range details are shown.
From the Choose backup policy menu:
- To change policies, select a different policy and click Save. The new policy is immediately applied to the vault.
To create a policy, select Create New.
For instructions on creating a backup policy, see Defining a backup policy.
Defining a backup policy
A backup policy defines a matrix of when the data snapshots are taken, and how long those snapshots are retained. When defining a policy for backing up a VM, you can trigger a backup job once a day. When you create a new policy, it is applied to the vault. The backup policy interface looks like this:
To create a policy:
- Enter a name for the Policy name.
Snapshots of your data can be taken at Daily or Weekly intervals. Use the Backup Frequency drop-down menu to choose whether data snapshots are taken Daily or Weekly.
If you choose a Daily interval, use the highlighted control to select the time of the day for the snapshot. To change the hour, de-select the hour, and select the new hour.
If you choose a Weekly interval, use the highlighted controls to select the day(s) of the week, and the time of day to take the snapshot. In the day menu, select one or multiple days. In the hour menu, select one hour. To change the hour, de-select the selected hour, and select the new hour.
By default, all Retention Range options are selected. Uncheck any retention range limit you do not want to use. Then, specify the interval(s) to use.
Monthly and Yearly retention ranges allow you to specify the snapshots based on a weekly or daily increment.
When protecting a VM, a backup job runs once a day. The time when the backup runs is the same for each retention range.
After setting all options for the policy, at the top of the blade click Save.
The new policy is immediately applied to the vault.
While managing backup policies, make sure to follow the best practices for optimal backup performance
On-demand backup of a virtual machine
You can take an on-demand backup of a virtual machine once it is configured for protection. If the initial backup is pending, on-demand backup creates a full copy of the virtual machine in the Recovery Services vault. If the initial backup is completed, an on-demand backup will only send changes from the previous snapshot, to the Recovery Services vault. That is, subsequent backups are always incremental.
The retention range for an on-demand backup is the retention value specified for the Daily backup point in the policy. If no Daily backup point is selected, then the weekly backup point is used.
To trigger an on-demand backup of a virtual machine:
On the vault item dashboard, click Backup now.
The portal makes sure that you want to start an on-demand backup job. Click Yes to start the backup job.
The backup job creates a recovery point. The retention range of the recovery point is the same as retention range specified in the policy associated with the virtual machine. To track the progress for the job, in the vault dashboard, click the Backup Jobs tile.
Stop protecting virtual machines
If you choose to stop protecting a virtual machine, you are asked if you want to retain the recovery points. There are two ways to stop protecting virtual machines:
- stop all future backup jobs and delete all recovery points, or
- stop all future backup jobs but leave the recovery points
There is a cost associated with leaving the recovery points in storage. However, the benefit of leaving the recovery points is you can restore the virtual machine later, if desired. For information about the cost of leaving the recovery points, see the pricing details. If you choose to delete all recovery points, you cannot restore the virtual machine.
To stop protection for a virtual machine:
On the vault item dashboard, click Stop backup.
The Stop Backup blade opens.
On the Stop Backup blade, choose whether to retain or delete the backup data. The information box provides details about your choice.
If you chose to retain the backup data, skip to step 4. If you chose to delete backup data, confirm that you want to stop the backup jobs and delete the recovery points - type the name of the item.
If you aren't sure of the item name, hover over the exclamation mark to view the name. Also, the name of the item is under Stop Backup at the top of the blade.
- Optionally provide a Reason or Comment.
To stop the backup job for the current item, click
A notification message lets you know the backup jobs have been stopped.
Resume protection of a virtual machine
If the Retain Backup Data option was chosen when protection for the virtual machine was stopped, then it is possible to resume protection. If the Delete Backup Data option was chosen, then protection for the virtual machine cannot resume.
To resume protection for the virtual machine
On the vault item dashboard, click Resume backup.
The Backup Policy blade opens.
When re-protecting the virtual machine, you can choose a different policy than the policy with which virtual machine was protected initially.
Follow the steps in Manage backup policies to assign the policy for the virtual machine.
Once the backup policy is applied to the virtual machine, you see the following message.
Delete Backup data
You can delete the backup data associated with a virtual machine during the Stop backup job, or anytime after the backup job has completed. It may even be beneficial to wait days or weeks before deleting the recovery points. Unlike restoring recovery points, when deleting backup data, you cannot choose specific recovery points to delete. If you choose to delete your backup data, you delete all recovery points associated with the item.
The following procedure assumes the Backup job for the virtual machine has been stopped or disabled. Once the Backup job is disabled, the Resume backup and Delete backup options are available in the vault item dashboard.
To delete backup data on a virtual machine with the Backup disabled:
On the vault item dashboard, click Delete backup.
The Delete Backup Data blade opens.
Type the name of the item to confirm you want to delete the recovery points.
If you aren't sure of the item name, hover over the exclamation mark to view the name. Also, the name of the item is under Delete Backup Data at the top of the blade.
- Optionally provide a Reason or Comment.
To delete the backup data for the current item, click
A notification message lets you know the backup data has been deleted.
For information on re-creating a virtual machine from a recovery point, check out Restore Azure VMs. If you need information on protecting your virtual machines, see First look: Back up VMs to a Recovery Services vault. For information on monitoring events, see Monitor alerts for Azure virtual machine backups.