Azure Site Recovery: Disaster Recovery and Business Continuity for Servers and Applications
A beginner-friendly, book-style guide to Azure Site Recovery. Learn how replication, recovery points, recovery plans, test drills, failover, and failback work, how to design for recovery time and data loss targets, and how to secure, cost, monitor, and troubleshoot disaster recovery in production.
Imagine a bakery that supplies bread to a whole town. One night a pipe bursts above the ovens, and by morning the kitchen is flooded. The owner has recipes in her head, ingredients in the cellar, and orders for two thousand loaves. If she has no plan, the town goes without bread for weeks. If she has a second kitchen across town, with a copy of the recipes, a stock of flour, and a checklist that says exactly who does what, the bakery is open again by lunchtime and customers barely notice.
Every company that runs computer systems is that bakery. Data centers flood, lose power, catch fire, suffer cyberattacks, or fail through plain human error. Whole cloud regions can have outages, rare but real. Azure Site Recovery is Microsoft’s service for building the second kitchen: it keeps a continuously updated copy of your servers in another place and lets you switch to that copy when the first place fails.
This guide assumes you know nothing about the topic. Every new term is explained the first time it appears, every big idea has an everyday comparison, and the chapters build on each other. By the end you will understand what disaster recovery is, how Azure Site Recovery works inside, how to plan and rehearse a recovery, how to protect Azure, VMware, Hyper-V, and physical servers, how to keep costs sensible, and how to find and fix problems.
1The Problem: When the Building Disappears
Before meeting any tool, understand the pain it removes. Once the pain is clear, every feature of Azure Site Recovery looks sensible instead of random.
Things go wrong, even in the cloud
People often believe that moving to the cloud makes outages impossible. It makes many failures rarer, but it does not abolish them. Cloud providers build data centers with great care, yet a facility can still lose power, a network cable can be cut, a software update can go wrong, or a natural disaster can strike a region. Inside your own organisation, a mistaken command can delete servers, and ransomware can lock every disk. Disaster recovery is the discipline of being ready for such days.
Fire, flood, storm, earthquake
A whole site can be unreachable for days. Backups stored in the same building are lost along with the servers.
Power and network failures
A utility fault, a cooling failure, or a broken network link can take down everything in one location.
Regional service incidents
Rarely, a cloud service in a region suffers a prolonged problem affecting many customers at once.
Mistakes and bad changes
A wrong script, a faulty deployment, or an administrator deleting the wrong resource group.
Ransomware and sabotage
Attackers encrypt or destroy systems. Recovery needs clean copies the attacker cannot reach.
Regulation and contracts
Banks, hospitals, and government suppliers are often required to prove they can recover within set times.
Two numbers that rule everything
Disaster recovery planning revolves around two measurements. The first is the Recovery Point Objective (RPO): how much recent data you can afford to lose, measured in time. An RPO of five minutes means that after a disaster you may lose, at most, the last five minutes of work. The second is the Recovery Time Objective (RTO): how long the business can stay down, measured from the disaster until service is running again. An RTO of one hour means the systems must be back within sixty minutes.
Picture a writer working on a novel. The RPO is how much writing she is willing to redo: if she saves every five minutes, the worst case is rewriting five minutes of text. The RTO is how long she can wait to resume writing after her laptop dies: if she keeps a spare laptop ready on the desk, she is back in minutes, but if she must order a new one, she is back in days.
Backups are not enough
A backup is a stored copy of data from a past moment. If you lose data, you restore it. Backups are essential, but restoring a large environment from backups can take hours or days: servers must be rebuilt, networks configured, data copied back, and applications started in the right order. A disaster recovery solution keeps a nearly ready copy of whole servers in another location, so that recovery means switching on prepared machines rather than rebuilding from scratch. The two are partners, not rivals: backups protect against deletion and corruption over time, while disaster recovery protects against loss of a whole site or region with short downtime.
The old way was painful and expensive
Traditionally, companies built a second data center with matching hardware, matching software, and a team to keep them in sync. It sat mostly idle, cost nearly as much as the first, and was tested rarely because tests were hard. When a real disaster came, many discovered that the copy was out of date or that no one remembered the startup order. The cloud changes the economics: the copy can live in Azure storage at modest cost, and the compute that runs the machines is paid for only when you actually fail over.
An illustrative example
Consider a hypothetical online insurance company with a customer portal, a policy database, and a payment gateway, running on 40 virtual machines in a data center. Management sets an RPO of 15 minutes and an RTO of two hours. With Azure Site Recovery, all 40 machines are replicated continuously to Azure. Every quarter, the team runs a test failover into an isolated network and checks that the portal works. When a real fire damages the data center, they run one recovery plan, the machines start in the correct order in Azure, the DNS record is updated, and customers are back within the hour with at most a few minutes of data lost.
2Core Concepts: The Vocabulary of Site Recovery
Azure Site Recovery has a modest vocabulary. Learn these words once, and every later chapter reads easily.
The words, one at a time
| Term | Plain meaning | Everyday comparison |
|---|---|---|
| Source (primary) site | The place where your servers normally run | The main kitchen |
| Target (recovery) site | The place where copies are kept and where you switch to in a disaster | The second kitchen across town |
| Replication | Continuously copying changes from the source servers’ disks to the target | Photocopying each new page as it is written |
| Recovery Services vault | The Azure container that holds Site Recovery settings, replication state, and recovery plans | The head office filing cabinet for the recovery operation |
| Replication policy | Settings for how long recovery points are kept and how often consistent snapshots are taken | The rules for how many copies of the recipe book to keep |
| Recovery point | A saved moment in time that you can recover to | A dated photo of the kitchen |
| Crash-consistent point | A copy of the disk exactly as if the power had been pulled at that moment | A photo taken mid-bake |
| Application-consistent point | A copy taken after applications finished writing their data in a tidy way | A photo taken after the oven was properly switched off |
| Failover | Switching from the source to the target so that the copy becomes the live system | Moving operations to the second kitchen |
| Failback | Returning to the original site after it has been repaired | Moving back to the main kitchen after repairs |
| Reprotect | Reversing the direction of replication after a failover so the new live site is protected | Setting up a new spare kitchen after the move |
| Test failover | A safe rehearsal that starts copies in an isolated network without affecting production | A fire drill |
| Recovery plan | A scripted order of steps for failing over many servers together | The evacuation checklist |
| Network mapping | A rule telling Site Recovery which target network matches which source network | A map between the old street plan and the new one |
A mental picture in five lines
You create a vault. You choose which servers to protect and a policy for them. Site Recovery starts replicating their disks to the target, and keeps a rolling set of recovery points. You build a recovery plan and rehearse it with test failovers. In a real disaster, you run a failover, choose a recovery point, and the replicated copies start as live servers. Later, you reprotect and fail back once the original site is healthy.
Think of a theatre with an understudy for every actor. The understudies watch every rehearsal and learn each change in the script as it happens, but they do not appear on stage and are not paid as lead actors. If the lead falls ill, the understudy steps in, using the latest script. Replication is the understudy studying every day, the recovery plan is the stage manager’s call sheet, and failover is the moment the understudy walks on.
What is and is not stored while waiting
While replication runs, the target holds only the disks of your servers (as storage), not running machines. The compute, meaning the processors and memory that actually run the server, is not charged until you perform a failover or a test failover. This is the central reason why Site Recovery is far cheaper than keeping a full duplicate environment running.
Remember the pair “RPO is about data, RTO is about time.” When people argue about how much to spend on disaster recovery, translate the argument into those two numbers per application, and the discussion becomes concrete.
3What Azure Site Recovery Is, and How It Differs from Its Neighbours
Azure has several features that sound alike: backup, availability zones, geo-redundant storage, and migration tools. Putting Site Recovery beside them makes its job clear.
A short history
Microsoft first offered a disaster recovery service for Hyper-V virtualisation hosts in the early 2010s, orchestrating replication between a company’s own sites. It soon grew to protect VMware machines and physical servers by replicating to Azure, and later to protect Azure virtual machines by replicating them from one Azure region to another. The service name settled as Azure Site Recovery, often shortened to ASR. Over the years it also served as a migration tool, since failing over a replicated server into Azure is effectively moving it. Today, Microsoft recommends Azure Migrate for new migrations, while Site Recovery stays focused on disaster recovery, and the two tools share some technology.
What Azure Site Recovery does
Continuous copying
Keeps a nearly current copy of server disks in another region or in Azure, with low data loss targets measured in seconds to minutes.
Recovery plans
Starts many servers in a defined order, with pauses, manual steps, and automation scripts, so complex applications come up correctly.
Non-disruptive testing
Runs copies in an isolated network to prove that recovery works, without touching production or interrupting replication.
Failover and failback
Moves the live workload to the recovery site, and later back, with reversed replication.
Many platforms
Azure virtual machines, VMware virtual machines, Hyper-V virtual machines, and physical servers.
Health and compliance
Shows replication health, achieved recovery point times, test results, and job history that auditors can use.
Site Recovery versus Azure Backup
| Question | Azure Backup | Azure Site Recovery |
|---|---|---|
| Main purpose | Restore data after deletion, corruption, or ransomware | Keep applications running after loss of a site or region |
| Typical recovery point | Daily or more frequent snapshots, kept for weeks to years | Continuous replication with recovery points kept for hours to days |
| Recovery speed | Minutes to hours, depending on size | Minutes to an hour or two, depending on the plan |
| Retention | Long-term history | Short-term, a rolling window |
| Unit restored | Files, disks, or whole machines | Whole machines in another location |
| Cost pattern | Per protected instance plus backup storage | Per protected instance plus replica storage; compute only after failover |
Backup is the family photo album kept in a safe: it lets you look back at how things were on a specific date, even years ago. Site Recovery is the spare apartment, already furnished, that you can move into tonight if your house burns down. Everyone needs both: the album will not give you a bed tonight, and the spare apartment will not show you how the house looked two years ago.
Site Recovery versus built-in redundancy
| Feature | What it protects against | What it does not do |
|---|---|---|
| Availability sets | Failures of individual hardware racks and maintenance events inside one data center | Does not protect against loss of the whole data center |
| Availability zones | Failure of one data center building inside a region, by spreading machines across zones | Does not protect against a regional problem; may need the application to be built across zones |
| Geo-redundant storage | Loss of a region for stored data, which is copied to a paired region | Does not restart your servers or applications |
| Azure Site Recovery | Loss of a zone, a data center, or a region, for whole virtual machines | Does not protect PaaS data services by itself; those have their own replication features |
Site Recovery and migration
You may see guides that use Site Recovery to move servers into Azure. That works, because replicating and failing over is a form of migration. For migrations, Microsoft’s current guidance centres on Azure Migrate, which provides discovery, assessment, and a replication engine. This guide focuses on disaster recovery, and notes where migration uses the same ideas. Check the current documentation for which tool is recommended for your scenario.
Supported operating systems, disk limits, regions, and features change often. Treat the numbers and lists in this book as orientation only, and confirm them against the current support matrix on Microsoft’s documentation before designing for production.
4Architecture: The Pieces and Where They Sit
The architecture depends on what you protect. We start with the most common case, Azure virtual machines replicated to another Azure region, then look at servers outside Azure.
flowchart LR
subgraph SRC["Source region"]
VM1["Protected VM with Mobility service extension"]
DSK["Source managed disks"]
CACHE["Cache storage account"]
VM1 --- DSK
VM1 --> CACHE
end
subgraph VAULT["Recovery Services vault"]
CTRL["Site Recovery control plane and recovery plans"]
end
subgraph TGT["Target region"]
REP["Replica managed disks"]
TVN["Target virtual network"]
TRG["Target resource group"]
end
CACHE -->|"changes sent over Azure backbone"| REP
VM1 -.->|"health and status"| CTRL
CTRL -.->|"orchestrates failover"| TGT
REP -->|"on failover, new VM is created from disk"| TVN
Azure to Azure
This design protects virtual machines that already live in Azure. When you enable replication, Site Recovery installs a small Mobility service extension inside each virtual machine. The extension watches for writes to the disks and sends changes to a cache storage account in the source region. From there, a Site Recovery process copies the changes over Microsoft’s private backbone network to replica managed disks in the target region. The target region has a resource group, a virtual network, and subnets prepared by you or created automatically. No target virtual machine exists until failover; the replica disks simply wait.
The cache storage account is a loading dock. Changes from the busy warehouse are placed there quickly in small parcels, then trucks carry them to the distant warehouse in a steady stream. The loading dock lets the main warehouse keep working without waiting for the long drive.
Servers outside Azure
| Source | Key components | Notes |
|---|---|---|
| VMware virtual machines | A replication appliance on-premises, the Mobility service on each protected machine, and the vault in Azure | The appliance collects changes, compresses and encrypts them, and sends them to storage in Azure. Older designs used a configuration server and process servers, which have been largely replaced by the newer appliance |
| Physical servers | The same appliance and Mobility service installed on each physical machine | Works for Windows and Linux physical machines that are supported |
| Hyper-V virtual machines | A Site Recovery provider and a recovery agent installed on the Hyper-V hosts | With or without System Center Virtual Machine Manager; hosts send data directly to Azure storage |
The common parts
Recovery Services vault
The Azure resource that holds replication configuration, recovery plans, policies, and job history. It lives in the target region for Azure-to-Azure setups, so that it remains available during a source region disaster.
Mobility service
Runs inside the protected machine and captures disk changes. It needs network access to the appliance or cache, and permission to take consistent snapshots.
Cache and replica storage
Temporary storage for change data on the source side, and persistent storage of replicated disks on the target side.
Network mappings
Define which target virtual network and subnet each source network corresponds to.
Recovery plans
Group machines, set the startup order, and attach scripts and manual steps.
Roles and identities
Built-in roles control who may configure, operate, and view disaster recovery.
Why the vault sits in the target region
If the vault lived in the same region as the protected machines and that region failed, you could not reach the tool that orchestrates recovery. For Azure-to-Azure protection, the vault belongs in the target region, the one that survives the disaster. For on-premises sources, the vault is in the Azure region where you want to recover.
Region pairs and choices
Azure regions come in pairs, two regions in the same geography that are designed to be far enough apart to avoid sharing a single disaster, for example separate cities. Many companies pick the paired region as their target for simplicity. You can also choose other regions in the same geography when data-residency rules allow, or when you need specific services or capacity. Check that the target region offers the virtual machine sizes and features your workloads need, and that your subscription has enough quota there.
A very common surprise is a failover that fails because the target region has no available quota for the virtual machine cores you need. Quota is allocated per subscription per region. Request increases for the target region before you need them.
5How Replication Works Inside
Follow a single disk write from a running server to its copy in another region, and you will understand almost everything about replication behaviour.
sequenceDiagram participant App as Application on VM participant MS as Mobility service participant CS as Cache storage participant ASR as Site Recovery service participant RD as Replica disk in target App->>MS: Write to disk MS->>MS: Capture the changed blocks MS->>CS: Upload changes to cache CS->>ASR: Changes available for processing ASR->>RD: Apply changes to replica disk MS->>MS: Every few minutes mark a crash consistent point MS->>MS: On schedule request application consistent snapshot ASR->>ASR: Store recovery point and remove expired points ASR-->>MS: Replication health reported to vault
Phase one: initial replication
When you first enable protection, the service must copy the entire contents of each disk to the target. This is the initial replication, and its time depends on the amount of data and the network capacity. A machine with 500 gigabytes of used data can take hours. During this phase the machine is not yet protected, and the health status shows it. Do not count the machine as covered until initial replication has finished and a first recovery point exists. Plan the start for a quiet period, and for on-premises sources consider the impact on your internet link.
Phase two: ongoing replication (delta)
After the first copy, only changes travel. The Mobility service tracks which blocks of the disk have been written and sends them as they happen. This is why the target stays within seconds or minutes of the source. The size of these changes per second is called data churn. A quiet web server has low churn. A busy database may have very high churn, and every disk type has limits on how much churn Site Recovery can handle, as documented by Microsoft. If churn exceeds what the network or the limits allow, replication falls behind and the actual RPO grows.
Initial replication is like moving a whole library to a new building by truck: slow and heavy, but done once. Ongoing replication is like handing a courier every new book as it arrives. If books arrive faster than the courier can carry them, the new library falls behind.
Recovery points
While changes flow, Site Recovery marks recovery points, moments you can later choose to start from. Two kinds exist.
- Crash-consistent recovery points are created frequently, typically every few minutes. They capture all disk writes up to a moment, but not data still sitting in application memory. Starting from such a point is like restarting a computer after a sudden power cut. Operating systems and well-designed databases usually recover fine, but this is not guaranteed.
- Application-consistent recovery points are created less often, on a schedule you choose in the policy, commonly every few hours. Before taking one, the service asks the operating system, using a snapshot facility such as Windows Volume Shadow Copy Service or Linux pre- and post-scripts, to tell applications to flush data and pause writes briefly. The result is a tidy copy where applications start cleanly.
| Type | How often (typical) | Strength | Limitation |
|---|---|---|---|
| Crash-consistent | About every 5 minutes | Frequent, low impact, small data loss window | Applications may need recovery on start; a few may not start cleanly |
| Application-consistent | Configured, often every few hours | Clean application state, best for databases | Less frequent; brief pause or load while taken; may fail if the snapshot facility is unhealthy |
| Multi-VM consistent | Chosen in a replication group | All machines in a group share a common point in time | Adds load, and can hurt performance for busy machines; use only when needed |
Retention
The replication policy sets how long recovery points are kept. Because points are stored as changes on top of the replica disks, keeping more of them uses more storage. The default is short, commonly 24 hours, and the maximum is measured in days, not months. If you need to recover to a time months ago, that is a job for backup, not Site Recovery.
RPO in practice
For Azure-to-Azure, the achieved RPO is usually seconds to a few minutes, but it is not a promise. It depends on churn, network throughput, and the health of the service. The portal shows the current RPO per machine, and you can set alerts if it exceeds your threshold. Treat the displayed figure as your real-time measurement, and set the alert threshold lower than your business target so that you have time to react.
What is replicated and what is not
- Replicated: the operating system disk and data disks attached to the machine, with their contents.
- Not replicated automatically: shared resources outside the machine such as load balancers, firewalls, DNS records, key vaults, and platform databases. You must plan for these separately, usually with infrastructure as code in the target region.
- Memory contents: not captured. Recovery starts the machine fresh from its disk, so running processes restart.
Disks that change heavily with temporary data, such as scratch space or page files, waste replication capacity. Exclude disks that hold only disposable data, where the product allows it, and place temporary files on local temporary storage that is not replicated.
6What You Can Protect: Scenarios and Boundaries
Site Recovery supports many sources and targets, but not everything. Knowing the boundaries early prevents unpleasant discoveries during a disaster.
Supported scenarios at a glance
| From | To | Typical use |
|---|---|---|
| Azure region A | Azure region B | Regional disaster protection for Azure virtual machines |
| Azure availability zone 1 | Azure availability zone 2 in the same region | Zone-to-zone protection for workloads that cannot be re-architected across zones |
| VMware virtual machines on-premises | Azure | Replace a secondary data center with Azure as the recovery site |
| Physical servers | Azure | Protect servers that are not virtualised |
| Hyper-V virtual machines | Azure | Protect Microsoft virtualisation hosts |
| Other clouds’ virtual machines | Azure | Treated as physical servers using the Mobility service; check support |
Microsoft has been changing options for on-premises VMware and Hyper-V sources, such as new replication appliances and new management experiences. Always follow the current setup guide for your scenario, and check retirement notices for older components.
Typical requirements for Azure virtual machines
- The machine runs a supported Windows or Linux version. Very old or custom kernels may not work.
- Disks are managed disks, or unmanaged disks within supported limits, and each disk is within the size limits.
- The machine can reach required Azure service addresses outbound, so the Mobility service can talk to the cache storage and the service.
- The target region supports the machine’s size, features, and any special hardware.
- Certain features need extra attention: disk encryption, proximity placement groups, availability zones, ultra disks, and shared disks have specific rules.
What Site Recovery does not cover
Platform databases and services
Azure SQL Database, Cosmos DB, and storage accounts are not virtual machines. They have their own geo-replication, failover groups, and redundancy settings that you must configure.
Network infrastructure
Load balancers, application gateways, firewalls, VPN gateways, and DNS are not copied. Build them in the target region ahead of time.
Identity and secrets
Key Vault contents, managed identities, and access rules must be prepared in the target.
Unsupported workloads
Some clustering types, special hardware passthrough, or machines with certain disk configurations are not supported.
Long-term history
Only a short rolling window of recovery points exists. Use backup for older data.
Application correctness
The tool copies disks. Whether the application works after failover depends on dependencies such as addresses, licences, and connected systems.
Designing with the boundary in mind
Treat Site Recovery as the machinery for virtual machines, within a bigger disaster recovery design. A complete design lists every component of the application, decides how each one will be recovered, and puts the answers in a single document. A customer portal may have web servers (Site Recovery), a SQL database (geo-replication or a failover group), static files in storage (geo-redundant storage), a front door that sends traffic (global load balancer), and secrets (a second vault in the target region). Site Recovery handles one line of that list.
An evacuation plan for a building is more than moving the people. It also covers the files, the safe contents, the phone lines, the keys, and the notice board that tells customers where to go. Site Recovery moves the people, in the form of the servers. The rest of the plan moves everything else.
Start with an inventory. List every application, its components, its owner, its RPO and RTO, and its dependencies. Rank applications by importance. You will find that only some need aggressive recovery targets, and that saves money.
7Setting Up Protection: Vaults, Policies, and Enabling Replication
Setup is a short sequence of decisions. Each decision has a consequence for cost, safety, and recovery speed.
The setup journey
Plan the target
Choose the target region, the target resource group, and the target virtual network with matching subnets. Confirm quota for the cores you will need during a failover.
Create a Recovery Services vault
For Azure-to-Azure, create the vault in the target region. Give it a clear name, tags, and access rules. One vault can protect many machines, but plan separate vaults for different environments or owners if you want separate permissions and reporting.
Create or choose a replication policy
Decide the recovery point retention and the frequency of application-consistent snapshots. Policies are reused across machines.
Enable replication for the machines
Select the virtual machines, confirm target settings per machine, and start. The service installs the Mobility extension and creates cache and replica resources. Initial replication begins.
Wait for protection to become healthy
Initial replication runs. When it completes, the machine shows as protected with a latest recovery point.
Create network mappings and recovery plans
Define how networks map and how machines will start in order. Then rehearse with a test failover.
The replication policy
| Setting | Meaning | Guidance |
|---|---|---|
| Recovery point retention | How long recovery points are kept, in hours or days | A day is common. Increase it if you need to roll back to before a bad change, remembering that storage cost grows |
| App-consistent snapshot frequency | How often application-aware snapshots are taken, or off | Use it for databases and applications that need clean starts. Do not set it so often that it harms performance |
| Multi-VM consistency (replication group) | Groups machines so that they share common recovery points | Use only for tightly coupled systems that must be consistent with each other, such as a clustered database |
The retention setting is how many dated photos of the kitchen you keep on the wall. Keep one day’s worth, and you can step back to any photo from yesterday. Keep ten days, and you have more choice, but you need a longer wall. The app-consistent frequency is how often you take a carefully posed photo with everything switched off and tidy, instead of a quick snapshot.
Per-machine target settings
For each protected machine you can control where its replica lives and what it will look like on failover: the target resource group, virtual network, subnet, availability setting, and disk type. You can also choose a different size for the target machine, which is useful for saving money when a smaller footprint is enough during an emergency, or when the same size is unavailable. Settings can be changed later, but some changes require disabling and re-enabling replication, so verify before you start.
Automation and scale
For more than a handful of machines, avoid clicking. Use Azure Policy to deploy replication to tagged machines, scripts or templates to enable protection, and Azure Resource Graph to report coverage. This ensures new virtual machines are not forgotten, a frequent source of failed disaster recovery tests: “we protected everything except the three servers added last month.”
Protecting machines you add later
- Include protection in your standard build process, so that no server goes live without it unless approved.
- Run a periodic report of machines in production that are not protected, and give owners a deadline.
- When machines are resized, disks added, or networks changed, check that replication settings still match.
- When machines are retired, disable replication so you do not pay to protect machines that no longer exist.
Tag protected machines with the name of their recovery plan and their tier. A tag-based report then answers questions like “which tier 1 servers are not yet protected?” in seconds.
8Networking for Disaster Recovery
A server that starts in the recovery site but cannot be reached is not recovered. Networking is the most common reason that disaster recovery plans fail on the day.
The core problem
Your source environment has addresses, firewall rules, load balancers, and name records that make it reachable and connected to other systems. A recovered virtual machine starts in a different network, possibly in a different geography. Unless you prepare the target network ahead of time, the machine may start with the wrong address, behind the wrong firewall, with no route to its database, and unknown to its users.
Network mapping
Network mapping tells Site Recovery which target network and subnet should host a failed-over machine from each source network and subnet. Without a mapping, the service picks a default or fails. For Azure-to-Azure, a mapping connects the source virtual network to the target virtual network. Plan address ranges so that the networks do not overlap if you want them connected.
flowchart TD USERS["Users on the internet"] --> GLB["Global traffic routing such as Front Door or Traffic Manager"] GLB -->|"normal operation"| LBP["Primary region load balancer"] GLB -.->|"after failover"| LBS["Secondary region load balancer"] LBP --> WEBP["Primary web VMs"] LBS --> WEBS["Recovered web VMs"] WEBP --> DBP["Primary database"] WEBS --> DBS["Recovered or replicated database"] DNS["Private DNS and name records"] --> WEBS FW["Firewall rules and NSGs prepared in secondary"] --> WEBS VPN["VPN or ExpressRoute to office"] --> LBS
Addressing choices
| Approach | How it works | Trade-off |
|---|---|---|
| Same IP addresses in the target | The target network uses the same ranges, and the recovered machine keeps its address | Simple for the application, but the two networks cannot be connected at the same time without overlap, which complicates testing and failback |
| Different IP addresses | The target has its own range, and each machine gets a new address, which you can reserve ahead of time | Allows both networks to be connected, but applications with hard-coded addresses and firewall rules need updating |
| Stretched networks (on-premises sources) | The same subnet is made available at both sites through special network devices | Keeps addresses unchanged but adds complexity and risk |
Whichever approach you choose, fix addresses for recovered machines in the settings so they are predictable. Applications should use names, not raw addresses, whenever possible, which makes address changes painless.
Names and traffic: DNS and global routing
Users reach your application through names such as portal.example.com. After failover, that name must lead to the recovered servers. There are two common ways. One is a DNS update: change the record to the new address, accepting that caches around the world will take time to expire, so set a short time to live (TTL) in advance. The other is a global traffic manager, such as Azure Front Door or Azure Traffic Manager, which watches health and sends users to whichever region is healthy. The second approach is faster and less manual, and is preferred for public applications.
DNS is the phone book. If your bakery moves to a new street, you must update the phone book entry, and people with old copies will still call the old number for a while. A global traffic manager is like a call-forwarding service that automatically redirects callers to whichever shop is open, so nobody has to look anything up again.
Load balancers, firewalls, and security groups
- Load balancers and application gateways are not replicated. Create equivalents in the target region and add recovered machines to their back-end pools, either through the recovery plan or through scripts. Site Recovery can attach recovered machines to a pre-created load balancer if you configure it.
- Network security groups and firewall rules must exist in the target with matching rules. A forgotten rule means a recovered machine silently blocks traffic.
- Public IP addresses in the target are different from the source. Plan for new public entry points.
- Private connectivity such as VPN or ExpressRoute from offices and partners must also be available in the target region.
- Dependencies on other systems such as identity servers, DNS servers, and monitoring must be reachable from the target network.
Connectivity for the service itself
The Mobility service and Site Recovery need outbound access to certain Azure service addresses for cache storage, the vault, and identity. If your machines sit behind a firewall or proxy, allow these addresses, or use service tags in network security groups. In locked-down environments, private endpoints for the vault and storage can keep replication traffic off the public internet. Microsoft publishes the lists of required addresses and the supported private options, which change occasionally.
Test failovers use an isolated network by default, so they will not reveal routing problems to production dependencies. Include an additional test in which the recovered test machines reach everything they will need in a real event, such as databases and identity servers, using a prepared test network connected to copies of those systems.
9Recovery Plans: Orchestrating the Recovery
A real application is not one server. It is a family of servers that must start in a sensible order. Recovery plans capture that order.
What a recovery plan is
A recovery plan groups machines and describes the steps for failing them over together. It is a document the service can run. Machines are placed into groups, which start one after another. Within a group, machines start in parallel. Between groups, you can add pre-actions and post-actions, which are manual steps for a human to confirm or automation scripts that run at defined points.
flowchart TD START["Start recovery plan"] --> G1["Group 1 Identity and DNS servers"] G1 --> A1["Post action check domain controller health"] A1 --> G2["Group 2 Database servers"] G2 --> A2["Post action attach database storage and verify"] A2 --> G3["Group 3 Application servers"] G3 --> A3["Post action run script to update settings"] A3 --> G4["Group 4 Web servers"] G4 --> A4["Post action add to load balancer and update traffic routing"] A4 --> DONE["Plan complete and verify application"]
A recovery plan is the opening checklist for a restaurant: first turn on the power and gas, then light the ovens, then start the kitchen, and only then open the doors to customers. Opening the doors before the kitchen is ready makes a mess, and so does starting a web server before its database.
Why order matters
- Identity and name services first. Domain controllers and DNS must be up before servers that need to authenticate or look up names.
- Databases before applications. Applications that start without their database may crash or cache an error state.
- Applications before web front ends. The front end should not accept customers until the back end is ready.
- Traffic last. Direct users to the recovered site only after checks pass.
Automation inside plans
Azure Automation runbooks
Scripts that run in the cloud at a point in the plan, for example to create public IP addresses, attach machines to load balancers, or update DNS.
Scripts and Functions
Other automation services can be called through runbooks or webhooks to perform steps the plan cannot.
Manual actions
Pauses where a person must confirm something, such as checking a financial report or approving the traffic switch.
Plan context data
When a runbook runs inside a plan, it receives information about the machines and the plan, helping scripts work out what to do.
Good recovery plan habits
- Create one plan per application or per tier of related applications, not one giant plan for everything.
- Keep scripts simple, tested, and idempotent, meaning running them twice causes no harm.
- Store scripts in source control, and keep a copy of the plan description outside the primary region, because documentation held only in the failed region is useless.
- Include a verification step at the end: a health check or smoke test that proves the application works.
- Design plans so they can run both ways: failover to the secondary and failback to the primary after reprotection.
- Version plans, and review them whenever the application changes.
Scale of plans
Plans have documented limits on the number of machines and groups. For very large estates, split protection into several plans, run in a planned sequence with a coordinating runbook or human leader. Check the current limits.
Write each recovery plan so that someone who has never seen the application could run it, under stress, at 3 a.m. Names, step order, and decision points should be obvious. Many real recoveries fail not from technology, but because the one person who understood the plan was on holiday.
10Test Failover, Failover, Reprotect, and Failback
These four activities form the life cycle of a real recovery. Learn them in the order you will use them.
flowchart LR A["Normal operation in primary region"] --> B["Replication to secondary"] B --> C["Test failover in isolated network"] C --> D["Cleanup test resources"] D --> B B --> E["Disaster in primary"] E --> F["Failover to secondary"] F --> G["Commit the failover"] G --> H["Run on secondary"] H --> I["Primary repaired"] I --> J["Reprotect to reverse replication"] J --> K["Failback to primary"] K --> L["Reprotect again to original direction"] L --> A
Test failover: the fire drill
A test failover creates copies of your machines from a recovery point in a separate, isolated virtual network. Production keeps running, and replication continues undisturbed. You log in to the test machines, check that applications start and data looks right, and then clean up, which deletes the test machines. Test failover is the single most valuable feature of the service, since a plan that has never been tested is only a hope.
- Run tests regularly, at least every few months, and after any major change in the application or network.
- Test with realistic scenarios, including starting the whole application from the recovery plan and verifying functionality from a user’s point of view.
- Time the test, and compare the result with your RTO.
- Record findings, fix what failed, and repeat.
- Remember that test machines cost money while they exist. Clean up promptly.
Failover: the real thing
In a real disaster, you run a failover on a machine or a recovery plan. The steps are as follows.
Decide
Someone with authority declares a disaster. This is a business decision as much as a technical one, because failing over has consequences.
Choose a recovery point
Options usually include the latest processed point (fastest), the latest point (which includes unprocessed data and takes slightly longer), the latest application-consistent point, the latest multi-VM consistent point, or a custom point in time. Pick the latest unless you suspect corruption, in which case choose an earlier point.
Start the failover
The service creates virtual machines from the replica disks in the target region, attaches them to the mapped network, and starts them in the order of the recovery plan.
Verify
Check each machine and the application: logs, services, database state, and connectivity.
Commit
Committing finalises the failover and removes other recovery points. After committing, you cannot choose a different point, so verify first.
Redirect users
Update DNS or global routing so that users reach the recovered servers.
Planned versus unplanned failover
An unplanned failover responds to a real or simulated disaster, accepting that some recent data may be lost because the source might not be able to send its last changes. A planned failover, available for some scenarios such as on-premises VMware and Hyper-V sources, first shuts down the source machines and sends the final changes, so no data is lost. Planned failovers suit expected events, like moving out of a building, or a drill that uses a real switch. Check which options exist for your scenario.
An unplanned failover is leaving the burning building through the nearest exit: you take what you can carry. A planned failover is a controlled move to a new office: you switch the old machines off at the end of the day, carry every box over, and open the new office the next morning with nothing missing.
Reprotect and failback
After failover, the recovered site is running without any safety net: its own copy no longer exists. Once the original site is repaired, you perform reprotect, which reverses replication so that changes made in the recovery site flow back to the original. After the original is up to date, you fail back, switching the live workload back. For Azure-to-Azure, the process re-creates virtual machines in the original region. For on-premises sources, failback copies data back to the on-premises environment, which may require additional components and bandwidth.
- After failback, reprotect again to resume the original direction of protection.
- Allow time for resynchronisation, which can be lengthy for large disks.
- Run failback during a quiet period, and plan another user redirection and verification.
Common failover decisions
| Question | Considerations |
|---|---|
| Is it truly a disaster? | Failing over for a short outage may cost more disruption than waiting. Define criteria and a decision maker ahead of time |
| Which recovery point? | Latest for outages; earlier for corruption or ransomware, after confirming the point is clean |
| Single machine or whole plan? | Plans handle dependencies. Single machine failovers suit isolated servers |
| How long will we run in the secondary? | Short stays may skip failback complexity; long stays need capacity, backup, and monitoring in the new site |
| How will we communicate? | Prepare messages for staff and customers, and a place outside the affected systems to publish updates |
If the disaster is ransomware, replication may have faithfully copied the encrypted disks. Choose a recovery point from before the infection, and combine Site Recovery with immutable backups. Do not assume the latest point is clean.
11Designing Disaster Recovery: Tiers, Targets, and Strategy
Technology is the easy part. The harder, more valuable part is deciding what to protect, to what level, and at what cost.
Start with the business
The right question is not “can we replicate everything?” but “what happens to the business if each system is down for an hour, a day, a week?” A business impact analysis assigns each application a cost of downtime, measured in lost sales, legal penalties, and damaged trust. That cost guides how much to invest in protection. A printing queue server and a payment gateway do not deserve the same recovery target.
Tiering applications
| Tier | Example | Typical RTO | Typical RPO | Typical approach |
|---|---|---|---|---|
| Tier 0 | Identity, DNS, core network services | Minutes | Near zero | Recovered first; sometimes always-on in both regions |
| Tier 1 | Revenue-critical systems such as payments and ordering | Under an hour or two | Minutes | Site Recovery plus platform replication for data; frequent drills |
| Tier 2 | Important internal systems | Several hours | An hour or less | Site Recovery with simpler plans |
| Tier 3 | Departmental tools, reporting | A day or more | Hours | Backup and rebuild, or low-cost replication |
| Tier 4 | Development, test, sandbox | Days | Not needed | Infrastructure as code to rebuild |
These figures are examples to show the idea. Your own numbers come from the business.
Strategies from cheap to expensive
Backup and restore
Cheapest. Recovery takes the longest because everything must be rebuilt and restored. Suits tiers with long tolerance.
Replicate and start on demand
Site Recovery’s classic mode. Disks are replicated, compute is created only on failover. Moderate cost, recovery in minutes to hours.
Reduced copy always running
A smaller version of the application runs in the second region and scales up on failover. Faster, but you pay for the running machines.
Both regions serve users
Highest cost and complexity, with near-zero downtime. Requires an application designed for multiple regions, often using global databases.
Think of insurance for a shop. A cold plan is a savings jar: you rebuild after the fire. A warm plan is a rented warehouse with shelves ready, waiting for stock. A hot plan is a second small shop already open with some staff. An active-active plan is two full shops both selling every day. Each step costs more and recovers faster.
Choosing the target region and mode
- Distance. Far enough to avoid the same disaster, close enough to keep replication latency and legal boundaries acceptable.
- Data residency. Laws may require data to stay in a country or a regional group.
- Service availability. The target must offer the same virtual machine sizes, storage types, and features.
- Quota and capacity. Request enough cores in advance. For the most critical systems, consider capacity reservations in the target region to guarantee that machines can start.
- Zone-to-zone option. When the main risk is the loss of a data center building and not a region, zone-to-zone disaster recovery protects within one region with lower latency and no cross-region data transfer, while keeping the same orchestration.
Document the whole application
For each application, write a one-page recovery sheet. It should name the owner, the tier, the RPO and RTO, every component and how it is protected, the order of recovery, dependencies, contact details, the location of the runbook outside the primary region, and the date of the last successful test. This sheet is the thing people reach for under stress.
Assume that the people who built the system may not be available during a disaster. Make the plan understandable to a competent engineer who has never seen it, and keep an offline copy, such as a printed page or a copy in another cloud, in case your documentation system is itself unreachable.
12Data and Application Consistency
Copying disks is easy. Making sure the copy actually works as an application is the real challenge, especially for databases and for systems made of several servers.
Why consistency matters
A database writes to several files at once: data files, log files, and index files. If a copy captures the data file at one moment and the log at another, the pieces may not agree, and the database refuses to start or, worse, starts with silent damage. Consistency means that the copy represents one coherent moment. Site Recovery gives you tools for this, but you must choose and test them.
Imagine photographing a busy restaurant ledger and the cash register at slightly different moments. The ledger shows a sale that the till has not yet recorded. When the accountants compare them later, the numbers do not match. A consistent copy photographs both at the same instant, or asks everyone to pause while the pictures are taken.
Single-machine consistency
For one machine, crash-consistent points are usually enough for modern file systems and well-built databases, which can replay their logs after an abrupt stop, just as they do after a power cut. For systems where you want a clean state, such as older databases or applications that cache heavily, application-consistent points are safer. On Windows, they rely on the Volume Shadow Copy Service and application writers such as SQL Server’s. On Linux, they use pre- and post-snapshot scripts that you provide to quiet the application.
Multi-machine consistency
Some systems spread state across several machines: a clustered database, an application server plus a message broker, or a sharded data store. If each machine is recovered to a slightly different moment, the system as a whole can be inconsistent. A replication group with multi-VM consistency makes the machines share common recovery points. The cost is extra overhead and the requirement that machines communicate with each other regularly during snapshot creation. Use it only when needed, and keep the group small. Check the documented limits on group size.
Databases need their own plan
| Database setup | Recommended approach | Reason |
|---|---|---|
| SQL Server on a virtual machine, non-critical | Site Recovery with application-consistent points | Simple, covers the whole machine |
| SQL Server with strict RPO | Database-level replication such as availability groups or log shipping to the secondary, with Site Recovery for the other machines | Database-aware replication can reach very low data loss and keeps databases consistent |
| Other database engines on VMs | Use the engine’s own replication for the data, Site Recovery for the host if useful | Native tools understand transactions |
| Azure SQL Database or Managed Instance | Active geo-replication or failover groups | Platform services are not virtual machines, so Site Recovery does not apply |
| Cosmos DB, Storage | Multi-region and redundancy settings | Built-in replication features |
Identity and directory servers
Domain controllers need special care. Restoring an old copy of a domain controller can cause replication conflicts across the directory. Microsoft recommends that for Active Directory you use a design in which additional domain controllers already exist in the recovery location, kept up to date by normal directory replication, rather than relying on replicating domain controller disks. If you do use Site Recovery for them, follow the specific guidance for the supported version. Cloud identity from Microsoft Entra ID is global and does not need regional failover.
Other special cases
- Clusters with shared disks. Some shared disk clusters have limited or special support. Check the matrix, and prefer application-level clustering or replication across sites.
- Licence-bound software. Software tied to hardware identifiers or addresses may stop working after recovery. Talk to vendors about disaster recovery licensing.
- Time-sensitive systems. Systems that depend on clocks, such as certificates or tokens, may need checks after a long gap.
- Scheduled jobs. Decide whether batch jobs resume automatically after failover, or whether someone reviews first, to avoid duplicates.
- Outbound integrations. Partners may allow only certain source addresses. Update them or use fixed outbound addresses planned for both regions.
After each test failover, do not stop at “the machine boots.” Run a business check: log in as a user, place an order, run a report, and compare totals with production. A boot is not a recovery.
13Security for Disaster Recovery
A recovery site holds a full copy of your most valuable systems and the power to take over production. It must be guarded as carefully as the original.
Who may do what
| Role | Allows |
|---|---|
| Site Recovery Reader | View health, status, and settings, but not change them |
| Site Recovery Operator | Run failover, failback, and test failover, and enable or disable replication for existing items, but not create or delete vaults or manage policies |
| Site Recovery Contributor | All Site Recovery management except giving access to others and deleting the vault |
| Owner | Full control, including access management |
Assigning a custom mix is possible. Enabling replication for Azure virtual machines also needs rights on the machines, the target resource group, and the network, so teams often combine Site Recovery roles with Virtual Machine Contributor on specific scopes. Keep the ability to run production failover with a small, trained group, and give wider read access so that operations and auditors can see status.
Protecting the vault and the recovery site
Least privilege and PIM
Grant time-limited elevated rights through Privileged Identity Management, and require multifactor authentication for anyone who can fail over.
Alert on changes
The Activity Log records disabling replication, changing policies, and failover actions. Alert on unexpected ones.
Resource locks
Use delete locks on vaults and key target resources, so an accidental or malicious deletion needs a deliberate extra step.
Private connectivity
Use private endpoints and firewall rules for the vault and cache storage where supported, keeping replication traffic off the public internet.
Managed identities
Newer options let the vault use a managed identity to reach cache storage, which reduces reliance on shared keys. Check current support.
Separate subscriptions
Hold the recovery resources in a subscription with different administrators when feasible, so a compromise of the primary does not automatically expose the recovery site.
Encryption
- In transit. Replication traffic is encrypted. Between on-premises sources and Azure, data is sent over secure channels.
- At rest. Replica disks in Azure are encrypted with platform-managed keys by default. You can use customer-managed keys through disk encryption sets where your policy demands it, and the target must have matching key vault and keys.
- Azure Disk Encryption. Machines that use it need extra steps: key vaults, key permissions, and target-region key access must be set up so that recovered machines can unlock their disks.
- Keys in the target region. If keys exist only in the failed region, you cannot start encrypted machines. Plan key replication or a key vault in the recovery region.
A spare office with a complete set of files is only useful if you also have the keys to its cabinets. Storing all the cabinet keys in the burning building makes the spare office a locked room of useless paper.
Ransomware and malicious deletion
An attacker with administrator rights may try to disable replication, delete replica disks, or destroy the vault so that you cannot recover. Defences include strong identity protection, alerts and locks, separate administration for the recovery site, and independent immutable backups held in a different security boundary. Remember that replication reproduces bad data quickly, so Site Recovery alone is not a ransomware defence; it must be combined with backup and clean recovery points.
Compliance and audit
Auditors often ask for evidence of regular disaster recovery tests. Keep records: test dates, scope, results, issues, fixes, and sign-offs. The service shows job history and test failover results, which you can export. Make sure the recovery region meets the same compliance requirements as the primary, including residency, certifications, and logging.
Do not let the recovery site become a weaker copy of the primary. A recovered environment often skips monitoring, patching, antivirus, and logging because “it is only for emergencies.” During a real event, it is the production system, and attackers know this.
14Performance, Capacity, and Cost
Disaster recovery is insurance. A good design buys the protection you need at a price you can accept, and avoids waste.
What you pay for
| Cost element | When it applies | Notes |
|---|---|---|
| Site Recovery licence | Per protected instance per month | Pricing differs by scenario, such as Azure-to-Azure versus on-premises to Azure. A free period for new instances may apply. Check current pricing |
| Replica disk storage | Continuously | Managed disks in the target region for each protected disk. Often the largest steady cost |
| Cache storage account | Continuously, small | Standard storage in the source region for temporary change data |
| Recovery point storage | Continuously | Grows with retention length and data churn |
| Network transfer | While replicating | Data leaving the source region is billed as outbound transfer between regions |
| Compute in the target | Only during test failover or real failover | The big saving compared with a duplicate environment |
| Supporting resources | When created | Load balancers, gateways, firewalls, and reserved capacity in the target region |
| On-premises components | Continuously | Appliance hardware or virtual machines, and the bandwidth needed |
A worked example
These figures are invented, to show the arithmetic only. Suppose a company protects 50 machines, each with 200 gigabytes of disks, so 10,000 gigabytes in total. Replica storage must hold roughly that much in the target region. Add a licence fee per machine per month, multiplied by 50. Add the small cache accounts, transfer of changed data, and recovery point overhead. Compare this with running 50 duplicate machines around the clock, which would add the full compute cost of 50 machines for the whole month. The difference, usually large, is the economic reason that replicate-and-start-on-demand is the default design. In a test failover lasting four hours, you pay only for four hours of compute for the machines you start.
Saving money wisely
Protect by tier
Do not replicate development and test machines that can be rebuilt from code.
Exclude disposable disks
Temporary or scratch disks add churn and storage cost with no value.
Choose disk types for the replica
The replica disks can use cheaper storage tiers than the source, accepting slower performance during an emergency. Weigh the risk against the saving.
Right-size the target machines
If your recovered environment can run smaller during the emergency, define smaller sizes, but test that it actually copes.
Keep retention modest
Longer retention costs more storage. Use backup for long history.
Clean up test failovers
Forgotten test machines run up compute bills. Automate cleanup.
Retire protection for decommissioned machines
Disable replication when machines are deleted, and delete orphaned replica resources.
Use reservations and capacity reservations carefully
Capacity reservations guarantee that cores are available in the target region but are billed whether used or not. Reserve only for critical tiers.
Capacity and performance on the day
Failover performance has two parts. First, the time to create and start machines, which usually takes minutes per group, although large plans take longer. Second, the performance of the recovered machines. Disks restored from replica storage may be slower at first, especially if the replica used a lower tier. Network paths from users and dependencies may be longer. Recovered machines in a distant region may see higher delay to remaining systems left in the original region, such as an on-premises database. Test application performance during drills, not just whether it starts.
A spare tyre is stored flat in the boot at low cost. You do not run four extra tyres around the car all year just in case. But the spare has to be inflated and the jack must be in the car, or the insurance is worthless. Likewise, replication is the cheap storage of the spare, and capacity, quota, and rehearsals keep it usable.
Measure data churn per disk before you enable protection, and again afterwards. Disks with very high churn may exceed what replication can handle, or may need premium storage and higher network capacity, which changes both the cost and the achievable RPO.
15On-Premises Scenarios: VMware, Hyper-V, and Physical Servers
Many organisations still run servers in their own data centers and use Azure as the recovery site. The ideas are the same, with extra pieces on the local side.
Why Azure as a recovery site
Building a second physical data center is slow and expensive. Using Azure as the recovery site converts that capital cost into a modest monthly charge, with compute paid only when needed. It also gives geographic separation without a new building, and it can later become a stepping stone for moving workloads permanently to the cloud.
VMware and physical servers
Replication appliance
A virtual machine or server you deploy on-premises that discovers machines, receives changes from the Mobility service, compresses them, and sends them to Azure.
Mobility service
Installed on each protected machine, captures disk changes. For VMware it can be pushed by the appliance with proper credentials.
Vault and storage
The vault receives status and orchestrates recovery. Replicated data is stored in Azure storage and turned into disks on failover.
Network path
Replication travels over the internet (encrypted) or over private connections such as ExpressRoute. Bandwidth sizing is critical.
Hyper-V
For Hyper-V, you install the Site Recovery provider and the Microsoft Azure Recovery Services agent on each host, register them with the vault, and enable protection on virtual machines. Replication is host-based, so you do not install an agent inside each guest machine. Some environments use System Center Virtual Machine Manager to manage clouds of hosts, and the provider integrates there.
Sizing the connection
The most common failure of on-premises setups is a link that is too small. To size it, estimate the daily change rate of all protected disks, convert to a sustained speed, and add a margin. Also consider the one-time cost of initial replication: terabytes over a modest link take days. Techniques include starting during quiet periods, throttling during business hours, and, where offered, shipping disks. If the link cannot keep up, the RPO grows steadily, and you may be unprotected without noticing.
| Question | Why it matters |
|---|---|
| How much data changes per day per disk? | Determines the sustained bandwidth needed and storage growth |
| How big is the initial copy? | Determines how long the first replication takes |
| Is the link shared with business traffic? | Replication may starve users or be starved itself |
| Is ExpressRoute available? | Provides predictable, private connectivity |
| Where will users connect during an outage? | Users may be in the same disaster zone; plan remote access to the recovered network |
| How will we fail back? | Failback means moving the changed data back, which also needs bandwidth and time |
Failing back to on-premises
After an on-premises failover, the site is repaired, and you want to return. The process reprotects the Azure machines, synchronises changes back to the on-premises environment, and then switches. It needs on-premises capacity ready, networking restored, and enough bandwidth to bring back the changes made while running in Azure. For long stays in Azure, plan for this carefully, and sometimes decide to remain in Azure and treat the failover as a permanent move.
Using Azure as the spare site is like renting a furnished apartment instead of building a second house. It is cheap to hold, and you move in when needed. But the road between the two homes must be wide enough to carry your daily deliveries, and you need a plan for getting your furniture back when the house is repaired.
On-premises components are software that needs patching, monitoring, and certificates. An outdated or unhealthy replication appliance silently stops replication. Treat it like any other production system, with alerts and updates.
16Monitoring, Logging, and Troubleshooting
A disaster recovery system that is broken without anyone noticing is worse than none at all, because it gives false comfort. Monitoring is how you keep the promise.
What to watch
Replication health
Each machine shows Healthy, Warning, or Critical, with reasons. Anything other than healthy needs action.
Current RPO
The age of the latest recovery point, per machine, with charts over time. Compare against your target.
Latest recovery points
Check that crash-consistent and application-consistent points are being created on schedule.
Test failover status
Last test date and outcome for each plan. Overdue tests are a finding.
Site Recovery jobs
A history of operations, with detailed errors for failed ones.
Appliance and agents
Health and version of replication appliances, Mobility agents, and providers.
Alerts and reports
- Enable email notifications and Azure Monitor alerts for replication health, RPO breaches, failed jobs, and failover events.
- Send vault diagnostics to a log workspace, and build a dashboard showing coverage, health, and the age of the latest test.
- Report weekly on unprotected machines in scope, using inventory queries.
- Track quota usage in the target region against the cores required for a full failover.
- Archive test reports as audit evidence.
Common problems and their usual causes
| What you see | Usual cause | What to do |
|---|---|---|
| Enable replication fails | Missing permissions, unsupported configuration, policy blocking resource creation, or quota | Read the job error, check roles, supported OS and disks, and Azure Policy denies in target resources |
| Mobility service installation fails | Agent cannot be installed: no extension handler, blocked network, or incompatible operating system | Check the VM agent status, outbound connectivity, and the support matrix |
| Replication health Warning with rising RPO | High churn, network limits, or throttling | Inspect churn charts, consider excluding disks, increasing bandwidth, or using premium storage |
| Replication Critical, no recent points | Agent stopped, cache storage inaccessible, or service connectivity broken | Check agent services, firewall rules, storage firewalls, and keys |
| App-consistent points are failing | Snapshot facility problems, such as VSS errors or a Linux script failing | Check the guest logs and the snapshot writers; fix or reduce frequency |
| Failover fails: not enough cores | Quota in the target region is too low | Request quota increases ahead of time; change sizes in the target settings |
| Failover fails: size or zone unavailable | Requested VM size or zone not offered in target | Select an available size or reservations; keep a list of alternatives |
| Recovered VM starts but is unreachable | Wrong subnet, missing NSG rules, no public IP or load balancer attachment, or DNS | Check the network mapping, effective security rules, and routes |
| Recovered VM won’t boot or has disk errors | Crash-consistent point captured a problematic state, or incompatible drivers | Try an earlier or app-consistent point; check boot diagnostics |
| Encrypted VM fails to start | Keys unavailable in the target | Prepare key vault and disk encryption sets in target; verify permissions |
| Test failover cleanup stuck | Resource locks or dependencies on test resources | Remove locks, delete dependent items, retry |
| Reprotect fails or is very slow | Large resync, missing target resources, or old resources still present | Allow time, check errors, and ensure the original site has needed resources |
A calm method for investigating
Open the machine’s replicated item
Read the health errors and the error code, and the time they began.
Sort the problem
Is it the machine and its agent, the network path, the storage, the permissions, or the service?
Compare with a healthy machine
What differs: disk, size, network, OS, firewall, or recent changes?
Fix and watch recovery
Apply one fix. Replication usually self-heals and catches up. Watch the RPO chart until it falls.
Record and prevent
Add the cause and cure to your runbook, and add a monitor or a policy to catch it earlier next time.
Treat a drill failure as a success of the process: the drill found the problem on a calm day. Make the findings visible, assign owners, and re-test, so that confidence grows from evidence.
17Choosing the Right Tool for Resilience
Site Recovery is one tool in a larger toolbox. Matching each tool to the problem gives a better and cheaper design.
flowchart TD
Q["What are you protecting against"] --> A{"Accidental deletion or corruption of data"}
A -->|"Yes"| BK["Azure Backup with immutable vaults"]
A -->|"No"| B{"Failure of a rack or host"}
B -->|"Yes"| AS["Availability sets and zones"]
B -->|"No"| C{"Loss of a data center building"}
C -->|"Yes"| ZN["Zone redundant design or zone to zone Site Recovery"]
C -->|"No"| D{"Loss of a whole region"}
D -->|"Virtual machines"| SR["Azure Site Recovery"]
D -->|"Platform databases"| GEO["Geo replication and failover groups"]
D -->|"Stored files"| GRS["Geo redundant storage"]
D -->|"Near zero downtime needed"| AA["Active active multi region design"]
The options compared
| Option | Strength | Weakness | Best for |
|---|---|---|---|
| Azure Site Recovery | Generic, works for most virtual machines without changing the application; orchestration and drills | Minutes to hours of recovery; machine-level only | Lift-and-shift workloads and tiers 1 to 3 without native replication |
| Application-native replication | Lowest data loss, application-aware | Needs application support and expertise | Databases and message systems with strict RPO |
| Active-active multi-region | Near-zero downtime and continuous testing in production | Most complex and costly; needs a cloud-native design | Mission-critical global services |
| Backup and restore | Cheap, handles deletion and ransomware | Slowest recovery | Low tiers and long-term history |
| Infrastructure as code rebuild | Repeatable, cheap, great for stateless tiers | Data must come from elsewhere | Stateless web tiers and dev environments |
| Third-party tools | Different features, possibly lower RPO or multi-cloud support | Extra licensing, skills, and integration | Estates that span clouds, or special requirements |
Product features and recommended tools shift over time, including how Microsoft positions Site Recovery, Azure Migrate, and the backup services. Check current announcements and the documentation for your scenario before you commit to a long-term design.
Combining tools
The best designs combine tools. A typical three-tier application might use infrastructure as code to rebuild stateless web servers, Site Recovery for the middle-tier application servers that are hard to recreate, a database’s own replication for data, geo-redundant storage for files, backup for history and ransomware recovery, and a global traffic manager to send users to the healthy region. Each does what it is best at.
Questions to settle the design
- What is the RPO and RTO for each application, and who has approved them?
- Which components can be rebuilt, which can be replicated, and which need native replication?
- What do we do about shared services, identity, DNS, certificates, and networks?
- Who is authorised to declare a disaster and run the plan?
- How often do we drill, and what do we do with the findings?
- How would we know if replication stopped working yesterday?
18Patterns and Anti-Patterns
Teams that recover well repeat a few good designs. Teams that struggle repeat a few familiar mistakes. Knowing both saves painful lessons.
Patterns that work
Tiered protection
Different applications get different targets and methods, based on business impact, so money goes where it matters.
Shared services first
Identity, DNS, networking, and key management are recovered or kept alive in the secondary before applications that depend on them.
Infrastructure as code for the recovery region
Networks, gateways, load balancers, and policies in the target region are built from templates and kept in step with the primary.
Recovery plans per application
Each application has its own ordered plan, tested and versioned, with runbooks and manual checks.
Regular, timed drills
Quarterly test failovers with measured RTO, business checks, and recorded findings.
Native replication for data tiers
Databases replicate with their own tools, while Site Recovery handles the machines around them.
Global routing for traffic
A global traffic manager shifts users automatically or with a single controlled change.
Backups for history, ASR for continuity
Both exist, with separate security boundaries, so ransomware cannot destroy every copy.
Habits compared
Healthy habits
- Written RPO and RTO per application
- Coverage reports for unprotected machines
- Quota and capacity checked in the target
- Drills followed by fixes and re-tests
- Offline copies of the runbooks
Habits that hurt
- Enabling replication and never testing
- Assuming the vault is a complete solution
- No network or DNS plan for the target
- Runbooks stored only in the primary region
- One giant plan nobody understands
Four decisions worth recording
Teams that write down their key decisions avoid arguing about them again a year later. These short records use the common format of context, decision, and consequences. They are illustrative examples, not mandates.
Use warm standby with Site Recovery for tiers 1 to 3, and rebuild tier 4. Context: finance asked why development machines were being replicated, and why the bill was high. Decision: only production workloads are replicated, and development environments are rebuilt from code. Consequences: lower cost and simpler plans; development teams must keep their environment code current.
Use global traffic routing instead of DNS edits for public applications. Context: a past drill took an extra hour because DNS caches kept sending users to the failed site. Decision: public entry goes through a global routing service with health probes, and the failover plan updates its settings. Consequences: faster, more predictable redirection; an additional service to run and secure.
Keep the recovery region in a separate subscription with separate administrators. Context: a credential theft in the primary subscription could have let an attacker delete replicas. Decision: recovery resources live in their own subscription with distinct access and alerts. Consequences: stronger protection against compromise; more complicated permission management and cross-subscription networking.
Reserve capacity in the target region for tier 1 systems only. Context: in a regional event, many customers may compete for capacity, and a failover could fail for lack of cores. Decision: tier 1 machines have capacity reservations in the target, while lower tiers rely on quota and best-effort capacity. Consequences: higher assurance for critical systems at a recurring cost; lower tiers may wait if capacity is tight.
19Best Practices and Common Mistakes
This chapter gathers the advice of the whole book into one checklist to use before launch, during reviews, and after incidents.
Best practices
Begin with business targets
Agree on an RPO, RTO, owner, and tier for each application, and write them down.
Inventory and automate protection
Use tags, policy, and templates so that every in-scope machine is protected automatically and exceptions are visible.
Prepare the target environment as code
Networks, security rules, load balancers, key vaults, and monitoring exist before the disaster, and are kept in sync.
Choose consistency deliberately
Use application-consistent points for databases, multi-VM groups only when truly needed, and native database replication for strict targets.
Build recovery plans with verification
Order, pauses, scripts, and final health checks, versioned with the application.
Drill regularly and measure
Run test failovers, time them against the RTO, validate business functions, fix the issues, and re-test.
Secure the recovery path
Least privilege, PIM, locks, alerts, private connectivity, and keys available in the target.
Monitor health and RPO continuously
Alert on warnings, track quota, and report weekly on coverage and test age.
Keep backup alongside
Backups protect against deletion and ransomware, while Site Recovery protects against loss of a site.
Train people and keep documents reachable
Practise roles, keep offline copies of runbooks, and plan communications.
Common mistakes
| Mistake | Consequence | Better approach |
|---|---|---|
| Never running a test failover | The first real test is the disaster itself | Schedule drills, report their results to management |
| Forgetting the network, DNS, and load balancers | Machines recover but nobody can reach them | Include network and traffic steps in the plan and the drill |
| Insufficient quota in the target region | Failover stops partway | Raise quota in advance; consider capacity reservations for critical tiers |
| Protecting only some machines of an application | The application cannot run in the secondary | Protect every dependent component or have a documented alternative |
| Ignoring database consistency | Recovered databases corrupt or lose transactions | Use app-consistent points or native replication |
| Putting the vault in the failed region | Cannot orchestrate recovery | Place the vault in the target region |
| Letting replication warnings linger | The true RPO is hours or days, not minutes | Alert and act on warnings promptly |
| Keys or secrets only in the primary | Encrypted machines or applications cannot start | Replicate keys and secrets to the target |
| Forgetting the cost of test machines | Unexpected bills | Clean up tests automatically |
| Assuming latest recovery point is always right | Ransomware or corruption restored faithfully | Choose an earlier clean point and use immutable backups |
| Single person knowledge | Plan fails when that person is away | Document, train, and rotate drill leaders |
| No failback plan | Stuck in a recovery site that was not meant for the long term | Plan reprotect and failback, or decide to stay permanently |
20Real-World Scenarios
The following scenarios are invented illustrations built from common situations. They are not case studies of real companies, and the numbers are examples chosen to make the ideas concrete.
Scenario 1: A software-as-a-service company protects its Azure estate
Situation. An imagined company runs its customer-facing application on about 80 Azure virtual machines in one region. Contracts promise recovery within four hours after a regional outage.
Design. Production machines are replicated to the paired region. The SQL tier uses availability groups with an asynchronous replica in the second region, while application and web tiers use Site Recovery. Networks, load balancers, and key vaults in the secondary region are deployed from templates. A global routing service steers users. Recovery plans start shared services, then data, then application servers, then web servers. The team drills every quarter and records the time.
Outcome. Drills show a recovery in about 75 minutes. A drill once uncovered a missing firewall rule, which was fixed before any real event. Customers’ auditors receive the drill reports each year.
Scenario 2: A manufacturer uses Azure as the recovery site for its data center
Situation. An imagined manufacturer runs 120 VMware virtual machines and a few physical servers in its own data center. Building a second data center was estimated to be too expensive.
Design. A replication appliance sends changes to Azure over a dedicated private link. The most important factory systems have recovery plans with manual actions for the plant managers. Less important systems are replicated with longer retention and no automation. Office staff connect to the recovered network over a site-to-site VPN created in advance. An annual full drill is planned during a scheduled production shutdown.
Outcome. The company avoids building a second site, pays modest monthly costs, and learns in its first drill that the VPN device settings were wrong. After the fix, the second drill succeeds.
Scenario 3: A retailer prepares for a peak season
Situation. An imagined online retailer has its busiest days at year end. An outage then would cost many times its normal daily revenue.
Design. In the months before the peak, the team raises quota in the secondary region, reserves capacity for tier 1 machines, shortens DNS TTLs, runs a full drill under simulated load, and writes a clear decision rule for when to fail over. During the peak, they add extra alerts on replication health and keep an incident bridge ready.
Outcome. No major outage occurs, but a brief regional network problem tests the decision rule, and the team decides correctly not to fail over because the primary recovered within minutes.
Scenario 4: A small firm keeps things simple
Situation. An imagined accounting firm has six virtual machines in Azure and no dedicated operations team.
Design. They protect all six machines with Site Recovery to the paired region using one policy, with a single recovery plan. Backups provide history. They run a test failover twice a year, with a short checklist printed on paper and a runbook stored in a different cloud service.
Outcome. The monthly cost is small. Their auditor accepts the test records as evidence, and the owner sleeps better.
21Frequently Asked Questions
Short answers to the questions beginners ask most often.
22Summary and Key Takeaways
You began with a bakery whose kitchen flooded overnight. You now have the blueprint for a second kitchen that is ready when you need it.
Azure Site Recovery continuously replicates the disks of your virtual machines and physical servers to another region or to Azure, keeping a rolling set of recovery points. Compute in the target is paid for only when you test or fail over. Recovery plans order the startup, test failovers prove the plan without disturbing production, failover switches the live workload, and reprotect and failback bring you home again. Around this machinery sit the decisions that decide success: business targets for RPO and RTO, a prepared target network and shared services, consistency choices for databases, security of the recovery path, honest cost planning, and continuous monitoring and rehearsal.
Key takeaways
- Start with RPO and RTO. Business targets per application decide the method, the tier, and the budget.
- Replicate disks, pay for compute only when needed. This is why Site Recovery is far cheaper than a duplicate environment.
- Prepare everything around the machines. Networks, DNS, load balancers, keys, quota, and shared services are not copied and must exist in the target.
- Choose consistency deliberately. Use application-consistent points for databases, and native database replication when data loss must be minimal.
- Drill, measure, and fix. Regular test failovers, timed against the RTO and checked from a business view, turn a hope into a capability.
- Secure the recovery path. Least privilege, locks, alerts, and keys available in the target, with backups kept separately for ransomware.
- Watch it every day. Replication health, current RPO, quota, and test age are the signals that tell you the promise still holds.
Build a small project in a test subscription: two virtual machines, a vault in the target region, a replication policy, network mapping, a recovery plan with two groups, and a test failover with cleanup. Then read the current Microsoft documentation for details that change quickly, such as the support matrix, limits, replication appliance versions, and pricing.