Lesson 4 of 5 Azure Backup

Backing Up and Restoring with Azure Backup

This lesson explains how backups run and which restore option fits each recovery scenario.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how VM backups are configured and taken.
  • Choose the VM restore option for a recovery scenario.
  • Describe file recovery and Azure Files restores.

Backing up

Backup for a VM is enabled from the VM's Backup page, from the vault's + Backup button, or from Business Continuity Center, by selecting a vault and policy. Azure Backup installs the backup extension (VMSnapshot or VMSnapshotLinux) and takes snapshots without shutting down the VM: application-consistent on Windows (through VSS) and on Linux when pre- and post-scripts are configured, otherwise file-system consistent or crash-consistent. The first backup is full; later ones are incremental.

Backup now takes an on-demand backup with a retention date you choose, for example before a risky change. Stop backup either retains backup data (recovery points remain and are billed, and protection can be resumed) or deletes backup data (subject to soft delete). The Backup jobs page shows progress and errors, such as a VM agent that is not running.

True or false

Taking VM backups

Exam skills 5.2.4

Check how Azure Backup takes VM backups and how protection is stopped.

Log in to try this activity Interactive activities are free with an account.

Restoring VMs

Restore VM offers several options, chosen by the recovery scenario.

OptionWhat it doesUse when
Create new VMCreates a new VM from the recovery point in a chosen resource group and VNetRebuild quickly with basic settings
Restore disksRestores managed disks and a template; attach them or deploy a VM with custom settingsCustomize the VM, such as a different size or availability set
Replace existingReplaces the disks of the existing VM, keeping a snapshot of the current disksRoll back the same VM in place
Cross-region restoreRestores to the paired region from a GRS vault with CRR enabledPrimary region unavailable or DR drills
Cross-subscription / zonal restoreRestores to another subscription, or to a chosen availability zoneMove or rebuild in a different scope or zone

File recovery restores individual files and folders without restoring the VM: the portal generates a script (executable for Windows, Python for Linux) that, when run on a machine with a compatible operating system, mounts the recovery point's disks as local drives over iSCSI for 12 hours; files are copied off and the disks are unmounted. Instant restore snapshots make restores faster.

The following diagram matches three restore requests to the Azure Backup option that suits each.

Matching three restore requests to Azure Backup options. A deleted folder on VM1 uses file recovery from yesterday's point; VM2's corrupted OS uses replace existing, which swaps in restored disks and keeps the VM, NIC and configuration; VM3 rebuilt larger in another VNet uses restore disk and then a new VM.
The scenario is illustrative.
Sort into groups

Which restore option?

Exam skills 5.2.4

Choose the restore option for each request.

Log in to try this activity Interactive activities are free with an account.

Restoring Azure Files

Azure Files backups restore the full share or individual files and folders, to the original location (overwriting or skipping conflicts) or an alternate location (another share in the same or another storage account). Because share backups are snapshots, restores are fast, and the snapshots also appear in the share's Snapshots page and as Previous Versions.

True or false

Restoring file shares

Exam skills 5.2.4

Check how Azure Files backups are restored.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing the restore option

Three requests arrive: a user deleted a folder of reports from VM1's D: drive yesterday; VM2's OS was corrupted by a failed update this morning and must be rolled back in place with the same IP address and configuration; and VM3 must be rebuilt as a new VM with a larger size in another VNet. Which restore option fits each?

For VM1, use file recovery to mount yesterday's recovery point and copy back the folder. For VM2, use replace existing, which swaps in the restored disks while keeping the VM resource, NIC and configuration. For VM3, use restore disks and deploy a VM with the new size and VNet from the restored disks or template; create new VM offers fewer customization choices.

Check yourself

How does file recovery give access to files in a VM recovery point?

Show answer

A script mounts the recovery point's disks as local drives over iSCSI, from which files are copied.

Exam Tips

Remember for the exam

  • Recover individual files from a VM backup with file recovery.
  • Roll back a VM in place with replace existing.
  • Customize a restored VM with restore disks.
  • Restore in the paired region with cross-region restore (GRS vault).