Back up and restore Azure virtual machines with Azure Backup
Back to the AZ-104 path
AZ-104Chapter 27

Microsoft AZ-104 Certification Study

Back up and restore Azure virtual machines with Azure Backup

Design VM protection, select consistency and policy, enable Windows and Linux backups, monitor jobs, and restore VMs, disks, files, regions, subscriptions, and zones.

Suggested study time: 120 minutes • Intermediate • Original rewrite based on the supplied Microsoft Learn module and checked against current Azure Backup documentation

Neon Azure administrator shield surrounded by virtual machines, networks, storage, identity, governance, monitoring, backup, and infrastructure as code symbols

1. Design for a tested VM recovery outcome

A company runs critical Windows and Linux virtual machines in Azure and needs proof that a corrupted or deleted server can be recovered. The administrator must select an appropriate protection model, enable scheduled and on-demand backups, verify jobs, restore the required scope, and test the complete business continuity and disaster recovery (BCDR) runbook.

This chapter assumes basic knowledge of Azure and managed disks. The optional lab uses an Azure subscription and creates billable resources, so use a sandbox when available and remove the lab resource group after validation.

  • Identify where fits among availability, replication, and disaster-recovery services.
  • Explain VM snapshots, consistency levels, Recovery Services vaults, policies, tiers, encryption, and the backup data path.
  • Protect Windows and Linux VMs through the Azure portal and Azure CLI, then monitor configuration and backup jobs.
  • Choose among whole-VM, disk, original-location, alternate-location, file-level, cross-region, cross-subscription, and cross-zone recovery.
  • Perform a controlled disk-replacement exercise and verify every restore subtask.
A study path connects BCDR objectives, protection design, policy, backup execution, recovery points, restore choices, and validation.
A useful backup strategy ends with a tested restore, not with a successful backup job.

2. Separate backup, availability, and disaster recovery

preserves point-in-time copies of stateful data so an administrator can move backward after deletion, corruption, ransomware, or an unwanted change. continuously or near-continuously replicates supported machines and orchestrates failover to another location. Availability zones reduce exposure to localized datacenter failures while the application continues running.

Select the resilience mechanism by failure mode.
NeedPrimary Azure capabilityCore behavior
Recover an earlier stateCreates retained recovery points and restores a VM, disks, or files.
Continue after a regional or site failureReplicates machines and coordinates failover and failback.
Remain available through a zonal failureAvailability zones and application architectureDistributes running instances across physically separate zones.
Meet complete BCDR objectivesLayered designCombines high availability, replication, backup, security, monitoring, and rehearsed recovery.

The decision also depends on application criticality, RPO, RTO, retention, operational complexity, and cost. Backup and Site Recovery are complementary; neither substitutes for application-level high availability by itself.

A decision diagram maps accidental loss to Azure Backup, zonal disruption to availability zones, and regional disaster to Azure Site Recovery.
Classify the event before choosing recovery technology.

3. Recognize capabilities and supported scenarios

is an Azure-managed protection service. For supported workloads, it removes the need to deploy a separate backup storage estate, offers self-service backup and restore, manages capacity, and centralizes policies, jobs, recovery points, security, and reporting.

Why organizations use .
CapabilityOperational value
Zero infrastructureAzure manages service-side backup components and vault storage; administrators do not scale or patch backup servers for native VM protection.
Long-term retentionDaily, weekly, monthly, and yearly points can meet audit requirements, with automatic expiry according to policy.
Access separationAzure RBAC makes the vault an authorization boundary and supports least privilege and separation of duties.
EncryptionData is encrypted in transit and at rest with platform-managed keys, with customer-managed key options for supported vault scenarios through Azure .
Private Azure transferAzure VM backup traffic uses the Azure backbone and does not require explicit internet connectivity from the protected virtual network.
Deletion protectionSoft delete, enhanced soft delete, immutability, Resource Guard, alerts, and multiuser authorization can protect recovery points against mistakes and attacks.
Central operationsRecovery Services vaults, , Log Analytics, Workbooks, and Resiliency in Azure expose jobs, alerts, inventory, and compliance.
Representative workloads from the module.
ScenarioProtection mechanism
Windows or Linux Azure VMIndependent VM recovery points stored and managed through a Recovery Services vault.
On-premises files, folders, and system stateMicrosoft Azure Recovery Services (MARS) agent.
On-premises Hyper-V, VMware, and supported workloadsSystem Center Data Protection Manager (DPM) or Microsoft Server (MABS), with vault integration.
-managed share snapshots and supported vaulted protection.
SQL Server or SAP HANA in Azure VMsWorkload-aware streaming backup with full, differential, log, low RPO, and point-in-time recovery options.

Vault backup storage can use locally redundant storage (LRS), zone-redundant storage (ZRS), or geo-redundant storage (GRS), subject to workload, region, and configuration support. Choose redundancy before protection begins because later changes can be restricted.

Azure and on-premises workloads connect to managed backup, secure vault storage, long-term retention, replication, and centralized monitoring.
The service combines protection, isolation, security, and operations.

4. Understand VM backup architecture and the Recovery Services vault

Azure VM backup coordinates a point-in-time snapshot of the selected managed disks and transfers protected data to service-managed storage associated with a Recovery Services vault. The vault is a management entity: it organizes policies, protected items, recovery points, jobs, alerts, security, and restore actions. You choose the vault rather than creating the underlying backup storage accounts yourself.

The vault must be compatible with the VM location and becomes an Azure RBAC boundary. Vault backup data is kept in infrastructure and fault domains separated from the source. A locally retained snapshot enables rapid operational recovery, while a vaulted copy provides longer retention and stronger isolation.

A VM backup extension coordinates disk snapshots, parallel incremental transfer, and storage in a Recovery Services vault governed by policy and Azure RBAC.
Snapshot and vault are two stages of one VM protection flow.

5. Distinguish application, file-system, and crash consistency

VM recovery-point consistency.
LevelWhat is capturedRecovery behavior
Application-consistentDisk state plus coordinated pending I/O and application state. Windows uses Volume Shadow Copy Service (VSS) writers; Linux requires successful custom pre/post scripts for the application.The VM and participating applications start in a consistent state, providing the strongest VM-level consistency.
File-system-consistentFiles are captured at the same point, but application memory and application transactions are not fully coordinated. It can result when VSS writers or Linux scripts are unavailable or fail.The file system is structurally consistent; applications may run their own log replay or cleanup at startup.
Crash-consistentOnly data already committed to disk is included; memory, host-cache writes, and pending I/O are excluded.The VM behaves as if power was lost and might run disk or application recovery. It is also used for stopped VMs or selected agentless crash-consistent protection.

For Windows, the VMSnapshot extension coordinates with VSS. For Linux, VMSnapshotLinux provides VM integration and administrators own the correctness of application scripts. A VM-level VSS copy does not replace workload backup when database-level log recovery or second-level point-in-time recovery is required.

Three concentric recovery-point levels compare application state, file-system state, and disk-only crash consistency.
Consistency determines how much repair the workload performs after restore.

6. Choose Standard or Enhanced VM backup policy and its tiers

A VM backup policy defines when protection runs and how long each recovery-point class survives. Standard policy supports daily or weekly schedules. Enhanced policy supports multiple backups per day, intervals as frequent as every four hours, longer configurable snapshot retention, managed-disk features, and broader support for newer VM and disk capabilities.

Policy and tier decisions.
FeatureStandard policyEnhanced policy
ScheduleOne daily or weekly backup.Multiple daily backups, with supported intervals down to four hours and a configurable operating window.
Instant Restore snapshotDefault two days; configurable from one to five days for daily schedules. Weekly behavior has specific fixed rules.Default seven days; commonly configurable from one to 30 days, subject to schedule and support rules.
Snapshot implementationIncremental operational snapshots.Initial full managed-disk snapshot followed by incremental deltas.
Selective disksFeature support is narrower and scenario dependent.Supports include/exclude rules and restoring an eligible disk subset.
Modern VM/disk capabilitiesValidate support before selection.Required or preferred for capabilities such as Premium SSD v2, Ultra Disk, Trusted Launch migration, and zone-resilient snapshots where supported.

A snapshot-tier recovery point is available as soon as the snapshot succeeds and supports Instant Restore. After transfer, its type becomes snapshot and vault. Local snapshots improve RTO but incur snapshot storage cost. Vault-tier data provides longer retention and isolation. Instant Restore cannot be disabled, but retention can be reduced to the supported minimum.

Selective disk protection is useful when only specific data disks are critical, or when a database-aware solution protects the application and VM backup only needs the operating-system disk. Document excluded disks so a restore does not produce an incomplete machine.

Standard and Enhanced policies feed an Instant Restore snapshot tier and a longer-retention vault tier.
Schedule controls recovery-point frequency; tier retention controls speed, isolation, and cost.

7. Follow the VM backup process from trigger to vault

  1. starts the job according to policy or an on-demand request.
  2. For agent-based application or file-system consistency, the first running-VM backup installs VMSnapshot on Windows or VMSnapshotLinux on Linux through the Azure VM agent. Supported agentless crash-consistent protection does not require the guest extension.
  3. The extension coordinates VSS on Windows or the Linux snapshot framework, and the service creates a point-in-time disk snapshot.
  4. A snapshot recovery point becomes available locally for Instant Restore.
  5. Disks are processed in parallel. After the initial protected state, only changed blocks are identified and transferred to the vault.
  6. Transfer can continue for hours at peak time; a daily VM backup normally completes in less than 24 hours, while the initial copy or a newly added disk can take longer.
  7. The vault records the recovery point, retention, job state, and restore metadata. The current policy keeps protection running until it is explicitly changed or stopped.

Schedule different VMs at staggered times, monitor disk churn and extension health, and avoid overloaded target storage during restores. Customer-managed keys can protect supported vault data, while Service Encryption and Azure Disk Encryption support protect disks and encrypted VMs according to their respective support matrices.

A seven-step timeline shows policy trigger, extension coordination, snapshot, Instant Restore point, changed-block transfer, vault point, and monitoring.
Snapshot completion and vault transfer are separate job phases.

8. Lab: protect Windows and Linux VMs through portal and CLI

The source exercise proves that both Windows and Linux Azure VMs can be protected. The following equivalent lab uses neutral resource names and current navigation. Commands create billable resources; review current image availability, region quotas, security defaults, and prices before running them.

LAB_RG=$(az group create --name rg-az104-backup-lab --location westus2 --query name -o tsv)

az network vnet create \
  --resource-group "$LAB_RG" \
  --name vnet-az104-backup \
  --address-prefixes 10.20.0.0/16 \
  --subnet-name snet-workloads \
  --subnet-prefixes 10.20.1.0/24

az vm create \
  --resource-group "$LAB_RG" \
  --name vm-win-backup-lab \
  --image Win2022Datacenter \
  --size Standard_DS1_v2 \
  --admin-username azureadmin \
  --admin-password '<strong-password>' \
  --vnet-name vnet-az104-backup \
  --subnet snet-workloads \
  --public-ip-sku Standard

az vm create \
  --resource-group "$LAB_RG" \
  --name vm-linux-backup-lab \
  --image Ubuntu2204 \
  --size Standard_DS1_v2 \
  --authentication-type ssh \
  --generate-ssh-keys \
  --vnet-name vnet-az104-backup \
  --subnet snet-workloads \
  --public-ip-sku Standard

If the CLI reports that a security profile or image is invalid, check the current image offer, regional support, subscription feature registrations, and explicitly supported security type. Do not blindly repeat an old preview-registration command from a historical lab.

Portal path for the Linux VM.
StepAction
1Open Resiliency, choose Configure protection, and select Azure Virtual machines with ; alternatively open the VM and its Backup capability.
2Choose or create a Recovery Services vault in the same region as the VM.
3Select Standard or Enhanced policy, inspect schedule, Instant Restore retention, vault retention, redundancy, and security.
4Enable backup, wait for deployment, then open the protected item and choose Backup now.
5Choose the on-demand recovery-point retention date and confirm the operation.
az backup vault create \
  --resource-group "$LAB_RG" \
  --location westus2 \
  --name rsv-az104-backup-lab

az backup protection enable-for-vm \
  --resource-group "$LAB_RG" \
  --vault-name rsv-az104-backup-lab \
  --vm vm-win-backup-lab \
  --policy-name EnhancedPolicy

az backup job list \
  --resource-group "$LAB_RG" \
  --vault-name rsv-az104-backup-lab \
  --output table

az backup protection backup-now \
  --resource-group "$LAB_RG" \
  --vault-name rsv-az104-backup-lab \
  --container-name vm-win-backup-lab \
  --item-name vm-win-backup-lab \
  --backup-management-type AzureIaasVM \
  --retain-until 2030-10-18

Friendly names are accepted in common single-VM cases, but native container and item names may be required when names are ambiguous or for advanced cross-subscription operations. Discover them with az backup container list and az backup item list rather than guessing.

A lab topology contains one Windows VM, one Linux VM, a virtual network, a Recovery Services vault, portal protection, CLI protection, and an on-demand backup.
Portal and CLI configure the same underlying vault, policy, protected item, and job model.

9. Monitor configuration, snapshots, transfer, and jobs

At VM scope, inspect protection status, latest recovery point, policy, and last backup result. At vault scope, review protected items, storage consumption, alerts, and all backup jobs. The job detail separates Snapshot from Transfer data to vault, so a local restore point can exist while vault transfer is still running.

Monitoring surfaces.
ScopeWhat to verify
Protected VMProtection state, policy, latest recovery point, last job result, extension state, and available restore actions.
Recovery Services vaultInventory, jobs, alerts, recovery points, policy associations, storage, security posture, and restore history.
Resiliency in AzureCross-vault and cross-subscription protection inventory, gaps, jobs, backup and disaster-recovery posture.
and Log AnalyticsMetrics, alert rules, diagnostic logs, Workbooks, historical reports, trends, and compliance evidence.
Azure CLIaz backup job list/show/wait for automation, polling, and runbook integration.

10. Choose the restore scope before launching a job

Core Azure VM restore choices.
Restore optionUse it whenKey behavior
Create a new VMThe source is missing or corrupt, a clone is needed, or a recovery drill must be isolated.Creates a VM from a recovery point in a supported target. Alternate-location VMs need their own backup configuration.
Restore disksYou need customization, manual attachment, template edits, or controlled reconstruction.Restores managed disks and VM configuration/template artifacts into the selected resource group.
Replace existing disks / Original Location RecoveryThe original VM still exists and must return to an earlier state.The VM must be stopped. snapshots current disks before swapping OS and selected data disks.
Item-level recoveryOnly a file or folder is missing.A recovery script mounts the selected recovery point as local volumes through the machine iSCSI workflow; copy required data, then unmount.
Selective disk restoreOnly protected disks from an Enhanced-policy recovery point are required.Restores an eligible subset without recreating every disk.

Instant Restore automatically uses the local snapshot when a recovery point has both snapshot and vault data. Vault restore is used when the snapshot is unavailable or ineligible. Restore duration depends on data size, tier, target IOPS and throughput, service queues, and the load on staging or target storage.

A recovery point branches to new VM, restored disks, replacement disks, selected files, and selected disks.
Restore the smallest scope that safely satisfies the incident.

11. Understand cross-region, cross-subscription, and cross-zone restore

Boundary-changing restore capabilities.
CapabilitySupported purposeImportant boundaries
Cross Region RestoreCreate a VM or restore disks in the Azure paired secondary region for an outage or BCDR drill.Requires supported GRS/vault configuration. Replace-existing is not the normal cross-region option, and secondary-region RPO differs from primary recovery points.
Cross Subscription RestoreRestore a managed VM or disks to another subscription in the same Microsoft Entra tenant under Azure RBAC.The vault property must be enabled. Snapshot-tier points and encrypted/ADE scenarios have restrictions. It can combine with supported cross-region or cross-zone restore.
Cross Zonal RestoreRestore a managed VM or disks to another logical availability zone.Requires supported ZRS or CRR/secondary-region conditions. Snapshot points and encrypted VMs have limitations. Zone numbers are logical per subscription.
Selective disk restoreRestore a subset of protected disks across supported boundaries.Only disks included by policy and present in the recovery point can be selected.

Always consult the current VM backup support matrix because combinations of policy subtype, disk type, encryption, managed identity, zone, region, subscription, private access, and recovery tier evolve independently.

A source vault connects to original location, another subscription, another zone, and the paired region with support boundaries.
Cross-boundary recovery is a capability to enable and test, not an automatic property of every recovery point.

12. Recover files and encrypted virtual machines safely

For item-level recovery, select a recovery point and generate the recovery script. Run it on a compatible machine to connect the recovery volumes, browse and copy required files, and then unmount the recovery point. The original backup schedule continues; file recovery does not replace the protected item.

supports protected VMs encrypted with Service Encryption and supported Azure Disk Encryption configurations. Azure Disk Encryption uses BitLocker encryption keys (BEKs) and can use key-encryption keys (KEKs) stored in Azure . Authorized restore procedures might need to recover keys or secrets before the VM can be rebuilt.

  • File/folder recovery from an encrypted VM backup is not supported in the scenario described by the module; restore the VM or disks and copy the files afterward.
  • Encrypted VM recovery commonly restores disks first and uses the supported script, template, PowerShell, or CLI procedure to recreate the VM.
  • Replace-existing and cross-boundary options have additional encryption restrictions; verify the current matrix.
  • Only authorized identities should restore key material. Azure and unauthorized users cannot read protected keys and secrets.

13. Lab: replace corrupted VM disks and track the restore

The source lab creates a general-purpose storage account as a staging location, stops the Windows VM, selects a recovery point, chooses Replace existing, and watches the restore job. In current managed-disk workflows the storage account can hold configuration metadata and temporary artifacts; restored managed disks live in the target resource group.

  1. Create a uniquely named storage account in the lab resource group and region, then wait for successful validation and deployment.
  2. Open the source VM and stop/deallocate it. Disk replacement fails the precheck while the VM is running.
  3. From the VM Backup page or the protected item in Resiliency/vault, choose Restore VM and select an appropriate successful recovery point.
  4. Choose Replace existing or Original Location Recovery and provide the required staging/target settings.
  5. Review the destructive scope: current OS and selected data disks will be replaced, although takes a pre-replacement snapshot of current disks.
  6. Trigger Restore, open Jobs, and inspect job details, real-time state, and every subtask until completion.
  7. Boot the VM, validate the operating system and application, confirm networking and extensions, and record the achieved RTO and selected recovery point.

The source VM must still exist for disk replacement. If it was deleted, create a new VM or restore disks instead. A powered-off VM can be recreated or have disks restored, but disk replacement requires the source VM to be stopped and available.

A restore runbook moves from successful recovery point to VM shutdown, disk replacement, job subtasks, boot, application validation, and evidence.
Recovery is complete only after service validation and documented evidence.

14. Explain the knowledge-check answers

Questions and reasoning.
QuestionCorrect answerReason
Which option replaces a disk on an existing VM?Replace existing.This is Original Location Recovery: swaps the source VM disks with those from the selected recovery point.
Why can replacement fail even when the recovery point is valid?The source VM was deleted or is unavailable.Replace existing requires the original VM resource. If it is gone, restore a new VM or restore disks.
What must also be true before disk replacement?The VM is stopped/deallocated.A running VM fails the restore precheck because its attached disks cannot be safely replaced.

15. Compact review of every topic

Short versions for active recall.
TopicRemember this
BCDR goalProtect both Windows and Linux VMs, prove backup jobs, and rehearse restoration.
Service choiceBackup goes backward in time; Site Recovery fails over a replica; zones keep distributed instances available.
BenefitsManaged infrastructure, retention, RBAC, encryption, private Azure transfer, soft delete, replication, and centralized operations.
VaultThe Recovery Services vault manages policies, recovery points, security, jobs, and restores and is an RBAC boundary.
ConsistencyApplication-consistent coordinates apps; file-system-consistent protects files; crash-consistent includes committed disk data only.
PolicyStandard is daily/weekly; Enhanced enables multiple daily points and broader modern VM/disk capabilities.
TiersSnapshot enables Instant Restore; vault provides isolation and long retention.
ProcessTrigger, coordinate extension or agentless mode, snapshot, changed-block transfer, vault point, monitor.
Use Azure portal, Azure CLI, PowerShell, REST, and policy-driven operations.
MonitoringCheck the VM, vault, Resiliency in Azure, , Log Analytics, and job subtasks.
Restore choicesNew VM, disks, replace existing, files, selected disks, region, subscription, or zone.
Encrypted VMPreserve and authorize BEK/KEK recovery; expect file-level and replacement limitations.
Lab resultStop the VM, choose a point, replace disks, track subtasks, boot, validate, and document RTO.
Knowledge checkReplace existing; the source VM must still exist and be stopped.

16. Practice, cleanup, and current resources

  • Build a decision table for accidental deletion, ransomware, zonal outage, and regional disaster, mapping each to Backup, availability, Site Recovery, or a combination.
  • Create Standard and Enhanced policies, then compare RPO, local snapshot retention, vault retention, supported disks, resilience, and cost.
  • Perform one file-level recovery and one isolated new-VM recovery before testing original-location disk replacement.
  • Capture evidence for recovery point, job result, restore subtasks, application validation, achieved RTO, and cleanup.
  • When finished, stop protection as intended, remove recovery points only with authorization, delete the vault in the correct order, and delete the lab resource group to avoid continued charges.