D6 · Recovery

Azure Site Recovery (ASR)

Azure Site Recovery replicates VMs and physical workloads to a secondary Azure region to enable . AZ-104 evaluates replication configuration, recovery plans, failover and failback.

What Azure Site Recovery is

continuously replicates Azure VMs between regions (or from on-premises to Azure) so that in case of a disaster you can fail over to the replica in minutes. It is not a backup — it's continuous replication for DR.

Critical difference: saves point-in-time snapshots to restore data. ASR replicates the VM's full state in near real time for recovery after a region outage.

What it can replicate

  • •Azure VMs → another Azure region
  • •On-premises VMware VMs → Azure
  • •On-premises Hyper-V VMs → Azure
  • •On-premises physical servers → Azure
  • •Azure Stack Hub VMs → Azure

Key benefits

  • •RPO as low as 30 seconds (for Azure VMs)
  • •RTO of minutes (not hours) — the replica VM already exists
  • •DR testing without impacting production
  • •Recovery Plans for orchestrated failover of multiple VMs
  • •Integration with Azure Automation for custom actions

What ASR is NOT

  • •It is not backup — it does not keep multiple historical restore points
  • •It does not replace Azure Backup for individual file recovery
  • •It does not protect against data corruption (the replica gets corrupted too)
  • •It is not active-active — the secondary region only accepts traffic on failover

Architecture and components

ASR components (Azure → Azure)

Recovery Services Vault

The main container where ASR is configured. Must be in the destination (secondary) region. Also used for Azure Backup.

Replication Policy

Defines: crash-consistent snapshot frequency (every 5 min), app-consistent snapshot frequency (every 1-12h), and recovery point retention (up to 72h).

Cache Storage Account

A temporary storage account in the source region where replication data is staged before being transferred to the destination region.

Target Resources

ASR automatically creates resources in the destination region: replica VNet, replica subnet, replica NIC. These resources are only used during failover.

Recovery point types

Crash-consistent

A snapshot of the disk state at that moment — equivalent to pulling the power cable on the VM. Data in memory is lost. Captured every 5 minutes.

App-consistent

A snapshot with OS quiescing — applications complete their pending writes before the snapshot. Data is consistent at the application level. Captured every 1-12 hours (configurable). Uses VSS on Windows.

Minimum RPO

With crash-consistent every 5 min: maximum RPO = 5 minutes of data lost in the event of a disaster. For transactional DBs, use app-consistent to guarantee transaction consistency.

Configuring Azure VM replication

Steps to enable replication

1Create a Recovery Services Vault in the destination region (e.g.: if the source is East US → vault in West US)
2In the vault: Site Recovery → Azure virtual machines → Enable replication
3Select the source region, resource group and the VMs to replicate
4Configure the destination region, destination resource group, destination VNet
5Select or create a Replication Policy (RPO, app-consistent frequency, retention)
6Enable replication — ASR automatically installs the Mobility Service extension on the VM
7Wait for the initial synchronization (~hours depending on disk size) — progress visible in the vault

Mobility Service

An agent automatically installed by ASR on each replicated VM. Captures the data writes to the VM's disk and sends them to the cache storage account. For on-premises VMs: manual installation or via Configuration Server.

VM requirements

  • • Supported OS: Windows Server 2008 R2+ and compatible Linux distributions
  • • Managed Disks: recommended (unmanaged disks also supported)
  • • Ultra Disks: NOT supported for replication
  • • Max 32 data disks per VM
  • • Accelerated networking: supported on the replica

Recovery Plans

A Recovery Plan orchestrates the failover of multiple VMs in a specific order with custom actions between steps. It allows you to fail over an entire multi-tier application with dependencies.

Structure of a Recovery Plan

Groups (VM groups)

VMs are organized into numbered groups. Failover runs the groups in order: Group 1 completes before Group 2 starts.

Pre/Post actions

Between groups you can add: Azure Automation Runbooks (PowerShell/Python scripts) or Manual actions (pause for human intervention).

Example — 3-tier app

Group 1: DB Server → fails over first

Pre-action: script that verifies the DB is up

Group 2: App Servers → start after the DB

Group 3: Web/Frontend → start last

Test Failover

Test Failover lets you test DR without interrupting production. It creates the replica VMs in an isolated test — production keeps running normally.

  • • Run it from the vault → Recovery Plan → Test Failover
  • • Select the recovery point and test VNet
  • • Test VMs are created with a "-test" suffix
  • • Verify the app works in the secondary region
  • • When done: Cleanup test failover → removes the test VMs
  • • Recommendation: run a test failover at least every 3-6 months

Failover and Failback

StepActionDescription
Failover 1Start failoverIn the vault → Recovery Plan (or individual VM) → Failover. Select a recovery point and confirm. ASR creates the VMs in the secondary region.
Failover 2Verify secondary VMsConfirm the VMs in the secondary region work correctly. Redirect DNS/Traffic Manager to the secondary region.
Failover 3CommitOnce verified, commit the failover. This finalizes the failover — the primary VM can no longer be used for failback without re-protection.
Re-protect 1Re-protectAfter the commit, re-protect: now the secondary region is the primary. ASR starts replicating back to the original region.
Failback 1Failback (optional)When the original region recovers, fail over back (failback) to the original region.
Failback 2Re-protect (final)Re-protect again: the original region is primary, the secondary is DR. Configuration restored to its initial state.

Failover types

Planned Failover

The primary VM is stopped first, syncs final data, then starts on the secondary. RPO = 0 (no data loss). For planned migrations.

Unplanned Failover

The primary region is unavailable. Failover from the last available recovery point. Some data loss possible (depends on the RPO of the last point).

Test Failover

A test with no impact on production. Replica VMs created in an isolated VNet. Does not interrupt active replication. Cleanup when done.

Use cases and limits

When to use ASR

  • → Critical workloads that need RTO in minutes, not hours
  • → Regulatory compliance requiring DR in a geographically separate region
  • → Migrating VMs to Azure (lift-and-shift with ASR)
  • → Protecting VMs against a full Azure region outage

Important limits

  • • Max 100 VMs per vault per simultaneous failover operation
  • • Max 32 data disks per VM
  • • Max 4 TB per disk (Premium SSD)
  • • Ultra Disks and Ephemeral OS Disks: not supported
  • • Paired regions recommended for DR (lower replication latency)

ASR costs

ASR license

Per protected instance per month. The first 31 days are free per instance.

Replica storage

Managed disks in the secondary region (billed even if the VM isn't running).

Replication egress

Data transfer between regions for continuous replication (standard egress cost).

Did you get this topic?

Test what you just learned

An administrator runs a Test Failover of a Recovery Plan in ASR. What is the impact on the production VMs in the primary region?

Ready to test "Azure Site Recovery"?

Put what you learned to the test with original AZ-104 exam questions.

Start AZ-104 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.