Every data platform eventually has a bad day: a region degrades, a deployment deletes the wrong partition, or a ransomware actor encrypts a storage account. What separates a difficult afternoon from a career-defining outage is whether the team had written targets, rehearsed procedures, and backups it had actually restored from before.
This lesson covers the working parts of recovery on Azure:
- Turning vague expectations into numeric RPO and RTO targets.
- Matching redundancy options to the failure they are meant to survive.
- Configuring backups per service rather than assuming defaults.
- Testing failover and restore on a schedule.
Prerequisites
- !Azure storage redundancy concepts
- !Basic Bicep or Azure CLI
- !A service with an agreed availability requirement
RPO and RTO are business decisions
Recovery Point Objective is the maximum data you can afford to lose, measured in time. If the finance feed fails and the system can restore to a point four hours ago, your RPO is four hours. Recovery Time Objective is how long the service may be unavailable before the impact becomes unacceptable. The two are independent: you can lose little data and take a long time to recover, or lose a great deal and recover quickly.
Write the numbers down per dataset before choosing any technology. A daily snapshot satisfies a twenty-four-hour RPO and nothing tighter, so asking for a fifteen-minute RPO with daily backups is a contradiction, not a configuration problem. These targets then drive redundancy choices, backup frequency, and the budget, which is why they belong to the business rather than to the platform team.
Also distinguish the failure you are planning for. Redundancy protects against disk, node, and datacenter loss. Backups protect against human error and malicious deletion, which are far more common than a regional outage. You need both, and neither substitutes for the other.
Redundancy and what each option survives
Azure storage redundancy determines what happens when hardware or a datacenter fails, at a cost that scales with the level of protection.
| Option | Survives | Read access during failure | Relative cost |
|---|---|---|---|
| LRS | Disk and node failure in one datacenter | Only in the primary | Lowest |
| ZRS | Datacenter failure within a region | Yes | Moderate |
| GRS | Region-wide failure | Secondary on failover only | Higher |
| RA-GRS | Region-wide failure | Secondary readable immediately | Higher |
| GZRS | Region and datacenter failure | Primary readable, secondary on failover | Highest |
The distinction that catches teams out is between GRS and RA-GRS. With ordinary GRS the secondary copies are writable but not readable until you initiate a failover, so dashboards cannot fall back gracefully. Read-access geo-redundant storage lets clients read from the secondary during the incident itself, which usually matters more for a reporting layer than write availability does.
Backups are configured per service
Storage redundancy is not a backup. A deleted container replicates faithfully to the secondary region, so protection against deletion comes from point-in-time restore, soft delete, or an object-level retention policy.
import requests
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
token = credential.get_token("https://management.azure.com/.default")
url = (
"https://management.azure.com/subscriptions/{sub}"
"/resourceGroups/{rg}/providers/Microsoft.DocumentDB"
"/databaseAccounts/{account}"
)
response = requests.patch(
url,
headers={
"Authorization": f"Bearer {token.token}",
"Content-Type": "application/json",
},
json={
"properties": {
"backupPolicy": {
"type": "Continuous",
"continuousModeProperties": {"tier": "Continuous7Days"},
}
}
},
)
print(response.status_code, response.text[:200])
Apply the same reasoning to each service. Synapse dedicated pools take automated backups with point-in-time restore inside a retention window you can extend. ADLS Gen2 benefits from soft delete and blob versioning, which recover individual objects. Azure Data Lake and Databricks tables gain another layer through Delta time travel, so a bad overwrite can be reverted without restoring anything at all.
Building the failover path
For storage, the redundant copy is handled by the platform. What you must define is how clients find the data when the primary region is unavailable, and that means DNS, configuration, and an explicit decision to fail over.
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: 'stadls001'
location: location
kind: 'StorageV2'
sku: { name: 'Standard_RAGRS' }
properties: {
isHnsEnabled: true
supportsHttpsTrafficOnly: true
minimumTlsVersion: 'TLS1_2'
allowBlobPublicAccess: false
}
}
resource blobServices 'Microsoft.Storage/storageAccounts/blobServices@2023-01-01' = {
parent: storageAccount
name: 'default'
properties: {
deleteRetentionPolicy: { enabled: true, days: 14 }
containerDeleteRetentionPolicy: { enabled: true, days: 14 }
isVersioningEnabled: true
}
}
Object versioning and soft delete are what make an accidental container deletion recoverable: deleted blobs remain restorable for the retention window instead of replicating straight to the secondary as gone. When a genuine regional event occurs, the failover itself is an explicit operation on the account, usually through az storage account failover, and it pauses writes while the secondary is promoted.
Document who approves the failover and what evidence they need. Failing over is a one-way operation for most redundancy options until you fail back, and during the failover writes are suspended, so it is a decision to be made deliberately at an appropriate severity rather than as a reflex.
Testing recovery instead of assuming it
An untested backup is a hypothesis. Schedule a restore drill and record the elapsed time, because the measured figure is the only RTO you can honestly quote. Choose a different service or failure mode each quarter: restore a Synapse pool to a point in time, read a Delta table at an older version, fail storage traffic to the secondary, and verify that application configuration resolves correctly afterwards.
Measure three things during each drill: how long recovery actually took, whether the restored data matched a known checksum, and which step had no documented owner. That last one is where most of the real findings live, usually a firewall rule, a DNS record, or a person who was on leave.
Keep the drill small enough that people will actually do it twice a year. A modest but frequent test builds a habit and a record; an ambitious annual exercise that gets postponed repeatedly builds nothing.
Store the drill results next to the runbook. A table with the date, service, target versus actual recovery time, and the follow-up items gives you something to show an auditor and a baseline that makes the next improvement measurable rather than anecdotal.
What readiness costs
Geo-redundancy roughly doubles storage charges, extended backup retention adds to the service bill, and the compute kept warm for fast recovery is never cheap. Present these as options tied to targets rather than as a single recommended stack: accepting a four-hour RPO for reference data and a five-minute RPO for transactions is a normal, defensible position.
Where the budget is fixed, reduce cost by tiering rather than by weakening protection. Keep hot data geo-redundant, move older snapshots to archive, and rely on time travel or versioning for the recent past instead of frequent full copies. The goal is spending concentrated on the datasets whose loss would actually be noticed.
Common Mistakes
Treating geo-redundancy as a backup
Fix: Add point-in-time restore, soft delete, or object versioning so deletion can be reversed.
Publishing RPO and RTO targets nobody measured
Fix: Derive them from restore drills and quote the measured duration rather than an aspiration.
Designing failover without testing client resolution
Fix: Verify DNS and application configuration during the drill, since broken resolution fails more often than missing data.
Deferring the first restore test until after an incident
Fix: Schedule a quarterly drill on a small scope and record elapsed time, checksum match, and ownership gaps.
Best Practices
- Agree RPO and RTO per dataset before selecting technology
- Use RA-GRS where reporting must continue during a regional incident
- Combine redundancy for hardware faults with backups for human error
- Keep a documented, named owner for the failover approval step
- Record measured recovery times as the source of truth for availability claims
Questions interviewers ask about recovery
đ¯Interview Tip
Expect the classic RPO versus RTO question. Answer with a concrete example from a service you know, such as a Synapse pool with an eight-hour backup cadence, then state what that implies for lost data and for the restore window.
Interview Questions
Q1: Explain the difference between RPO and RTO.
RPO is the maximum acceptable data loss expressed as time, so a fifteen-minute RPO means restoring at most fifteen minutes behind. RTO is the maximum acceptable downtime before the service impact becomes unacceptable. Backups must be frequent enough for the RPO and the restore procedure fast enough for the RTO.
Q2: Why is geo-redundancy not sufficient protection?
Replication copies changes faithfully, including the consequences of an accidental or malicious delete, because the secondary mirrors the primary. Protecting against deletion requires point-in-time restore, soft delete, versioning, or an independent copy retained under its own policy.
Q3: When should you choose RA-GRS over GRS?
When applications or reports must read from the secondary region while the primary is unavailable. Ordinary GRS only exposes the secondary after a failover, whereas read-access geo-redundant storage serves reads continuously.
Q4: How do you test disaster recovery realistically?
Run scheduled drills that restore a service to a point in time or shift traffic to the secondary, measure the elapsed time against the RTO, verify data with checksums, and document any step without a named owner. Unplanned incidents are a poor first test.
Key Takeaways
- RPO and RTO are business inputs that drive technology choices
- Redundancy handles hardware faults, backups handle human error
- Geo-replication faithfully copies deletions as well as data
- RA-GRS matters when reporting must continue during an incident
- Measured restore times are the only honest RTO figures
- Small, frequent drills outperform ambitious annual exercises