Sub topic 3
Backup and restore: the lowest-cost strategy
This chapter assumes you know Regions, Availability Zones, S3, EC2, and managed databases such as RDS. It also assumes you have read the earlier chapters on recovery time objective (RTO) and recovery point objective (RPO).
What the strategy is
Backup and restore keeps copies of your data in a second Region. It runs no application servers there. When a disaster hits, you rebuild the infrastructure in the recovery Region and restore the data into it.
Between disasters, the DR Region costs you only storage for the backups. That makes this the cheapest of the four standard strategies. It is also the slowest to recover, because everything is created after the failure.
How recovery works
Recovery has three parts:
- Deploy the network, compute, and load balancers in the DR Region, ideally from infrastructure as code.
- Restore data from the latest copied recovery point: databases from snapshots, files from S3, volumes from EBS snapshots.
- Redirect traffic to the new environment.
What RTO and RPO to expect
RPO depends on how often you back up. A daily backup means you can lose up to a day of data, plus any delay in copying it to the second Region. Continuous backup, such as point-in-time recovery for supported services, shortens the gap. Cross-Region copies of continuous backups can still lag behind.
RTO is typically hours. Restore time grows with data size, and you must also wait for the infrastructure to be built. The strategy fits workloads that tolerate an RPO and RTO measured in hours.
| Property | Backup and restore |
|---|---|
| Running resources in DR Region | None (storage only) |
| Typical RPO | Hours (backup interval plus copy delay) |
| Typical RTO | Hours or more |
| Cost | Lowest |
| Main risk | Slow, untested restores |
A backup plan with a cross-Region copy
This AWS Backup plan takes a daily backup and copies it to a vault in us-west-2. The next chapter covers AWS Backup in detail. Create the destination vault first, then run aws backup create-backup-plan --backup-plan file://plan.json.
{
"BackupPlanName": "dr-daily",
"Rules": [
{
"RuleName": "daily-with-cross-region-copy",
"TargetBackupVaultName": "Default",
"ScheduleExpression": "cron(0 5 * * ? *)",
"Lifecycle": { "DeleteAfterDays": 35 },
"CopyActions": [
{
"DestinationBackupVaultArn": "arn:aws:backup:us-west-2:111122223333:backup-vault:dr-vault",
"Lifecycle": { "DeleteAfterDays": 35 }
}
]
}
]
}The rule runs at 05:00 UTC every day. Each recovery point is kept for 35 days in both Regions.
Common errors
- Backups only in the primary Region. A Region failure takes the backups with it. Always copy to a second Region.
- No resources assigned to the plan. A plan does nothing until you assign resources to it, by tag or by ARN.
- Encryption keys that exist only in the primary Region. Encrypted copies need a key you can use in the DR Region.
- Restores never tested. A backup you have not restored is a guess. Time a restore and compare it with your RTO.
- Service quotas in the DR Region. A rebuild may need more instances than the default limits allow.
Exercise
A workload has an RPO of 4 hours and an RTO of 12 hours. The team plans one daily backup, copied to a second Region. Does backup and restore meet the targets? What would you change?
Show answer
The RTO of 12 hours is plausible for backup and restore if the restore and rebuild are tested. The RPO is not met, because a daily backup can lose up to 24 hours of data, plus the copy delay. Increase backup frequency to at most every few hours, or use continuous backup or point-in-time recovery where the service supports it, and confirm the cross-Region copy finishes within the remaining RPO budget.