Azure Site Recovery: Replicate and Fail Over to Another Region
30-second answer
Azure Site Recovery (ASR) continuously replicates an Azure VM's disks to another region, so you can run the VM there within minutes if the primary region fails. You enable it from the VM's Disaster recovery blade, and the Recovery Services vault must be in the target region. A replication policy sets how long recovery points are kept (up to 15 days) and how often app-consistent snapshots are taken; crash-consistent points come every 5 minutes. You rehearse with a test failover into an isolated virtual network and then clean it up. In a real outage you fail over (choosing a recovery point such as Latest processed for the lowest RTO), commit, then re-protect to replicate back, and later fail back the same way.
Simulate it » No Azure account neededExam objective: 5.2.5 Configure Azure Site Recovery for Azure resources. 5.2.6 Perform a failover to a secondary region by using Site Recovery. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open the VM and select <strong>Backup + disaster recovery → Disaster recovery</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open the VM and select Backup + disaster recovery → Disaster recovery.
- Pick the target region. Replication goes to another region in the same geography, often the paired one.
- The vault sits in the target region. The cache storage account sits in the source region and buffers changes before they’re sent.
- After initial replication the item is Protected. Crash-consistent points come every 5 minutes; the RPO is a few minutes.
- Run a Test failover into an isolated network. Production keeps running and replicating, so you can rehearse any time.
- When the app checks out, Cleanup test failover deletes the test VM. Add notes for your DR drill record.
- East US is down. Failover: pick a recovery point. Latest processed gives the lowest RTO; Latest gives the lowest RPO. Shut down the source first if it’s still reachable.
- Commit makes the recovery point final. Then Re-protect replicates West US 2 back to East US, so you can fail back later the same way.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Site Recovery: replicate and fail over
Azure Site Recovery replicates a VM’s disks to another region, into a Recovery Services vault in the target region. A test failover builds a copy in an isolated network. A real failover is followed by commit and re-protect.
🤔 What happens if…
Read this tour as text
- Platform metrics arrive on their own. Every Azure resource sends platform metrics (Percentage CPU, Transactions, Availability) to Azure Monitor about once a minute, with no agent and no setting. Metrics explorer charts them. Azure keeps them for 93 days.
- Resource logs need a diagnostic setting. Resource logs (StorageRead, AuditEvent, NSG events) are thrown away until a diagnostic setting routes them to a Log Analytics workspace, a storage account or Event Hubs. The activity log records who changed what in the subscription and keeps it 90 days.
- Ask the workspace with KQL. Logs land in tables in the workspace: AzureDiagnostics, StorageBlobLogs, AzureActivity, InsightsMetrics. KQL reads top to bottom through pipes:
wherefilters,summarize count() by bin(TimeGenerated, 5m)groups,render timechartdraws. - Alert rule fires into an action group. An alert rule watches a signal (a metric, a log query, the activity log) and fires when the condition holds. It hands the alert to an action group: email, SMS, push, voice, a webhook, a Logic App, a Function or an ITSM ticket.
- Alert processing rules. An alert processing rule acts on alerts that already fired. Suppress notifications during a maintenance window, or apply an action group to every alert in a scope. The alert still shows in Alerts; only the notifications change.
- Insights and Connection monitor. VM insights collects performance and a connection map through the Azure Monitor Agent and a data collection rule. Network Watcher Connection monitor runs TCP, HTTP or ICMP tests from an agent on the source VM and records failures and round-trip time.
- Back up to a vault on a schedule. A Recovery Services vault in the same region as the VM backs it up on a backup policy: when to run, how long to keep instant-restore snapshots and daily, weekly, monthly and yearly points. A Backup vault protects blobs, disks, PostgreSQL flexible servers and AKS.
- Restore, and soft delete. Restore files by mounting a recovery point, create a new VM, restore disks, or replace existing disks. Soft delete keeps deleted backup data for 14 days at no cost, so a mistake or an attacker can be undone.
- Site Recovery: replicate and fail over. Azure Site Recovery replicates a VM’s disks to another region, into a Recovery Services vault in the target region. A test failover builds a copy in an isolated network. A real failover is followed by commit and re-protect.
Two jobs for one afternoon. Protect the contracts storage account with a Backup vault (and find out what the vault's identity needs first), then replicate the ERP VM to West US 2, run a disaster recovery drill that doesn't touch production, and do a real failover, commit and re-protect.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
If East US goes down, the order system goes down with it.
😊 THE SOLUTION
Replicate the VMs to West US 2 and rehearse the failover.
- Region-wide outage✓ Continuous replication to another region
- DR plan never tested✓ Test failover into an isolated VNet
- No way back✓ Commit, re-protect and fail back
Start with a question
If your office building flooded tonight, where would everyone work tomorrow?
A sensible company has a second office in another city with desks ready and copies of every file synced overnight, or better, every few minutes. Twice a year they send a small team there for a day to prove the laptops log in, without closing the main office.
Azure Site Recovery is that second office for your VMs. It keeps copying every change to another region. A test failover is the practice day. A real failover is moving everyone when the main office floods, and re-protect is setting up the sync in the other direction so you can move back later.
Explain it like I’m 10
The technical explanation
How Azure-to-Azure replication works
-
1 Enable
From the VM, choose the target region. Site Recovery installs the Mobility service extension.
-
2 Cache
Disk writes are captured and buffered in a cache storage account in East US.
-
3 Replicate
Changes are sent to replica managed disks in West US 2. No VM runs there yet.
-
4 Recover
Crash-consistent points every 5 minutes, app-consistent on the policy schedule, kept up to 15 days.
What lives where:
| Component | Region | Notes |
|---|---|---|
| Source VM, cache storage account | Source (East US) | The cache buffers changes before they’re sent |
| Recovery Services vault | Target (West US 2) | Must be in a different region from the VM |
| Replica disks, target resource group, target VNet | Target | Created at enable time or chosen by you. The target VM itself is created only at failover |
You can replicate to any region in the same geographic cluster (often the paired region), and into an availability zone. You pay a Site Recovery fee per protected VM (about $25 a month, illustrative, first 31 days free) plus storage, and compute in the target region only while a failed-over or test VM runs.
Enable replication
Portal path: VM > Backup + disaster recovery > Disaster recovery. Tabs: Basics (target region, replicate to availability zones), Advanced settings (target subscription, VM resource group, virtual network, availability, capacity reservation, cache storage, replication policy, Recovery Services vault), Review + Start replication. You can also start from the vault: Site Recovery > Azure virtual machines > Enable replication.
The default replication policy keeps recovery points for 24 hours and takes app-consistent snapshots every 4 hours; you can keep points up to 15 days. Multi-VM consistency groups VMs that must share consistent recovery points, such as an app tier and its database.
Most admins enable replication in the portal. From the command line it’s PowerShell (New-AzRecoveryServicesAsrReplicationProtectedItem with fabrics, containers and mappings) or the az site-recovery extension, which needs fabric, protection container and provider JSON. The practice lab below uses a simplified version of those commands.
Test failover: rehearse without risk
Vault > Protected items > Replicated items > the VM > Test failover. Pick a recovery point and an Azure virtual network that’s isolated from production (a separate test VNet in the target region, so IP addresses don’t clash). Site Recovery creates a VM from the recovery point; production keeps running and replicating. Check the app, then run Cleanup test failover with notes, which deletes the test VM.
$item = Get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $container -FriendlyName vm-erp01
$job = Start-AzRecoveryServicesAsrTestFailoverJob -ReplicationProtectedItem $item -Direction PrimaryToRecovery -AzureVMNetworkId $testVnetId
Start-AzRecoveryServicesAsrTestFailoverCleanupJob -ReplicationProtectedItem $item -Comment "Drill passed"
Real failover, commit, re-protect, fail back
| Step | What it does |
|---|---|
| Failover | Choose a recovery point and create the VM in the target region. Tick Shut down machine before beginning failover if the source is still reachable, to avoid data loss |
| Commit | Makes the chosen recovery point final and removes the others. Until you commit, you can change recovery point |
| Re-protect | Starts replication from the target region back to the original region (uses the original disks where possible) |
| Fail back | A planned failover back to the original region when it’s healthy, then commit and re-protect again |
Recovery point choices: Latest (lowest RPO, processes all pending data first, slower), Latest processed (lowest RTO, default), Latest app-consistent, Latest multi-VM processed or app-consistent for multi-VM groups, and Custom.
Start-AzRecoveryServicesAsrUnplannedFailoverJob -ReplicationProtectedItem $item -Direction PrimaryToRecovery
Start-AzRecoveryServicesAsrCommitFailoverJob -ReplicationProtectedItem $item
Update-AzRecoveryServicesAsrProtectionDirection -ReplicationProtectedItem $item -AzureToAzure `
-ProtectionContainerMapping $reverseMapping -LogStorageAccountId $cacheId -RecoveryResourceGroupId $rgId
Recovery plans
A recovery plan groups replicated VMs into ordered groups (database first, then app, then web), with pre and post actions: Azure Automation runbooks (for example to update DNS or a load balancer) and manual steps. You run test failover, failover and failback on the plan as a whole, which turns a 40-step runbook into one button.
Architect level Things that break a real failover
Capacity: in a big regional outage, many customers fail over to the same region. Capacity reservation in the target region guarantees the VM sizes you need. Networking: map the target VNet, subnets, NSGs and public IPs in advance, and plan DNS changes (Traffic Manager or a runbook in the recovery plan). Identity: make sure domain controllers or Microsoft Entra Domain Services are reachable from the target region. And remember that replication copies everything, including ransomware encryption, within minutes. That’s why Site Recovery sits next to Azure Backup, not instead of it.
Real-world business scenario
Woodgrove Distribution (fictional)
- The problem
- The order management system ran on four VMs in East US. A regional outage would stop order intake for the hours it took to restore from backup, which the contract with their largest customer didn't allow.
- What they used
- Site Recovery replicated the four VMs to West US 2 into a vault there, with multi-VM consistency for the app and database tiers and capacity reservation for their sizes. A recovery plan failed over the database group first, then the app group, with a runbook updating the Traffic Manager endpoint. Every quarter they ran a test failover of the plan into an isolated VNet and cleaned it up.
- Why that choice
- Replication kept data loss to minutes, the recovery plan made failover one action, and quarterly drills proved it worked without touching production.
- The result
- During a later East US networking incident they failed over in 22 minutes, committed, re-protected, and failed back the next weekend.
When to use it and when not to
✓ Use it when…
- A VM must run again within minutes if its region fails.
- Several VMs must come back together in a set order: use a recovery plan.
- You need to prove DR regularly without downtime: test failover.
✕ Think twice when…
- Recovering from deletion, corruption or ransomware. Replication copies the damage; use Azure Backup.
- PaaS services with their own geo-replication (Azure SQL Database, Cosmos DB, storage GRS). Use their native options.
- Workloads that can wait hours for a restore. Backup with Cross Region Restore costs less.
↔ Alternatives to consider
- Azure Backup with Cross Region Restore when hours of RTO are acceptable.
- Availability zones for datacenter-level failures within one region.
- Active-active deployments across regions behind Front Door or Traffic Manager for near-zero downtime.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between Azure Backup and Site Recovery?
Model answer
Backup keeps copies from points in time so you can go back after a deletion or ransomware, but restoring takes hours. Site Recovery keeps a constantly updated replica in another region so a VM can be running there in minutes if the region fails. Most production VMs have both.
Intermediate Where does the Recovery Services vault go for Azure-to-Azure disaster recovery, and why?
Model answer
In the target region. If the source region goes down, the vault and its replication metadata have to survive and be usable to run the failover, so they live where you're failing over to. A cache storage account sits in the source region to buffer changes before they're sent.
Experienced developer Which recovery point would you pick in a real failover?
Model answer
Latest processed if I want the VM up fastest, because the data is already processed. Latest gives the lowest data loss but processes pending data first, which takes longer. Latest app-consistent if the app needs a clean, application-consistent state, like a database server, at the cost of losing up to the snapshot interval.
Scenario The board wants proof every quarter that the ERP system can run in West US 2, without downtime. How?
Model answer
A recovery plan for the ERP VMs with the database group first and the app group second, and a test failover of the plan into an isolated VNet in West US 2 each quarter. We check the app, record the results, then run cleanup test failover. Production keeps running and replicating the whole time.
Quick revision
Key points
- ASR replicates Azure VMs to another region continuously. Enable it on the VM's Disaster recovery blade or from the vault.
- The Recovery Services vault is in the target region. A cache storage account is in the source region. The Mobility service extension is installed for you.
- Replication policy - recovery point retention up to 15 days, app-consistent snapshot frequency. Crash-consistent points every 5 minutes.
- Test failover goes to an isolated VNet and doesn't affect replication; always clean it up.
- Real failover - choose a recovery point, fail over, commit, re-protect, then fail back and re-protect again. Recovery plans fail over groups of VMs in order.
Important terminology
- Azure Site Recovery
- The Azure service that replicates VMs to a secondary location and orchestrates failover and failback.
- Azure-to-Azure replication
- Site Recovery replicating Azure VMs from one Azure region to another.
- Replication policy
- Recovery point retention (up to 15 days) and app-consistent snapshot frequency for replicated VMs.
- Recovery point
- A point the VM can be failed over to. Crash-consistent every 5 minutes; app-consistent on the policy's schedule.
- Test failover
- Creates a copy of the replicated VM in an isolated network without affecting production or replication.
- Commit
- Confirms a failover, after which you can no longer switch to a different recovery point.
- Re-protect
- Starts replicating the failed-over VM back to the original region so you can fail back.
- Recovery plan
- A group of replicated VMs that fail over together in a defined order, with optional scripts, runbooks and manual steps.
Common mistakes
- Putting the vault in the same region as the source VM.
- Running a test failover into the production VNet in the target region, causing IP conflicts.
- Forgetting to re-protect after failover, leaving the VM with no disaster recovery.
Exam tips
- "Validate the DR plan without affecting production" = test failover to an isolated VNet, then cleanup.
- "Lowest RTO" recovery point = Latest processed. "Lowest RPO" = Latest.
- Order after an outage - failover → commit → re-protect → (fail back → re-protect).
Five quick revision questions
-
1.Which region must the Recovery Services vault be in for Azure-to-Azure replication?Show
The target (secondary) region.
-
2.How often are crash-consistent recovery points created?Show
About every 5 minutes.
-
3.What's the maximum recovery point retention in a replication policy?Show
15 days.
-
4.What do you run after a test failover?Show
Cleanup test failover.
-
5.What makes the failed-over VM replicate back to the original region?Show
Re-protect.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.