Anatomy of backup and restore

A second Region that holds the backups: what is copied there, what has to be restored and rebuilt when the first one is impaired, and where AWS says so. Scroll to take it apart.

Scale model of two AWS Regions as stacked layers: a fleet of servers, a database and backup vaults in the first, with requests coming down from above onto its fleet; in the second only backup vaults on its lowest layer, with a dashed outline where its servers will be built, and backup copies crossing from the first Region's vaults to the second's
All anatomiesBack to all anatomies

Drag to turnCtrl + scroll to zoomClick a partDrag to turnTwo fingers to move and zoomTap a part

Backup and restore

Two Regions, one of them holding the backups

Each step of the scroll changes the drawing. Every statement names the AWS page it comes from.

Step 1 of 10

Only backups cross the line

Region A runs the workload. Region B receives copies of its data and applications; the rest is rebuilt on demand.

“Backup and restore copies data and applications to the recovery site and rebuilds on demand, giving an RPO in hours and an RTO of up to a day.”
AWS Well-Architected: REL13-BP02

Step 2 of 10

Copied to Region B

AWS Backup copies backups to a vault in Region B, on demand or on the schedule of a backup plan.

“Using AWS Backup, you can copy backups to multiple AWS Regions on demand or automatically as part of a scheduled backup plan.”
AWS: Creating backup copies across AWS Regions

Step 3 of 10

How often sets the recovery point

How often the backups run decides the recovery point that can be reached, and it should meet the RPO.

“How often you run your backup will determine your achievable recovery point (which should align to meet your RPO).”
AWS: Disaster recovery options in the cloud

Step 4 of 10

The infrastructure waits as code

Besides the data, the infrastructure, configuration and application code must be redeployed in Region B. AWS asks that the infrastructure be deployed as infrastructure as code, such as AWS CloudFormation templates, so it can be redeployed quickly.

“To enable infrastructure to be redeployed quickly without errors, you should always deploy using infrastructure as code (IaC) using services such as AWS CloudFormation or the AWS Cloud Development Kit (AWS CDK).”
AWS: Disaster recovery options in the cloud

Step 5 of 10

Machine images too

Code and configuration are backed up as well, including the Amazon Machine Images the servers are launched from. An AMI can be copied across Regions.

“In addition to user data, be sure to also back up code and configuration, including Amazon Machine Images (AMIs) you use to create Amazon EC2 instances.”
AWS: Disaster recovery options in the cloud

Step 6 of 10

A backup is tested by restoring it

Restore testing in AWS Backup restores recovery points from the vaults on a schedule and measures how long each restore takes. When the test is finished, AWS Backup begins deleting what it restored.

“When the scheduled time in your plan arrives, AWS Backup starts restore jobs based on your plan and monitors the time taken to complete the restore.”
AWS: Restore testing

Step 7 of 10

Region A is impaired

A service disruption stops Region A from answering. Region B holds the backups, but nothing that can answer a request.

This step is the scenario, not a statement from AWS.

Step 8 of 10

Restore the data

In Region B the data is restored from the backups stored there. A restore from backup is a control plane operation.

“Any data stored in the disaster recovery Region as backups must be restored at time of failover.”
AWS: Disaster recovery options in the cloud

Step 9 of 10

Rebuild the infrastructure and code

In Region B the infrastructure and the code are rebuilt. AWS asks for these actions to be automated, so the failover is repeatable.

“For backup and restore, restore data and rebuild infrastructure and code. Automate these actions so failover is repeatable.”
AWS Well-Architected: REL13-BP02

Step 10 of 10

Traffic moves to Region B

With Region B rebuilt, traffic is switched to its endpoint and away from Region A.

“On failover you need to switch traffic to the recovery endpoint, and away from the primary endpoint.”
AWS: Disaster recovery options in the cloud

The parts

Tap one, or tap it on the model

The parts

AWS Backup and its vaults

Takes the backups on a schedule and copies them to a vault in Region B.

  • Centralized. “AWS Backup is a fully-managed service that makes it easy to centralize and automate data protection across AWS services, in the cloud, and on premises.”
  • The vault. “In AWS Backup, a backup vault is a container that stores and organizes your backups.” AWS: Backup vaults
  • Images belong to a Region. “However, AMIs are Region-specific resources—to launch an instance in a specific AWS Region, the AMI must be located in that Region.” AWS: Copy an Amazon EC2 AMI
  • Untested, unknown. “Backups can be incomplete, corrupted, or slower to restore than your recovery targets allow, and you may only find out when you try to restore the backup.” AWS Well-Architected: REL09-BP04
AWS: What is AWS Backup?

AWS CloudFormation, the templates

Describes the infrastructure that Region B does not have yet, so it can be redeployed there.

  • Every resource. “AWS CloudFormation provides Infrastructure as Code (IaC), and enables you to define all of the AWS resources in your workload so you can reliably deploy and redeploy to multiple AWS accounts and AWS Regions.”
  • A template. “You create a template that describes all the AWS resources that you want (like Amazon EC2 instances or Amazon RDS DB instances), and CloudFormation takes care of provisioning and configuring those resources for you.” AWS: What is CloudFormation?
  • Without it. “Without IaC, it may be complex to restore workloads in the recovery Region, which will lead to increased recovery times and possibly exceed your RTO.”
  • AWS's caution. In backup and restore, the whitepaper Disaster recovery options in the cloud says: “In addition to data, you must redeploy the infrastructure, configuration, and application code in the recovery Region.” That is the opposite of REL11-BP04's advice: “Complete control plane work, such as creating functions, load balancers, API gateways, and tables, before an event and as part of failover rehearsal, so the event itself needs only data plane operations.” AWS Well-Architected: REL11-BP04
  • The application code. “You can use AWS CodePipeline to automate redeployment of application code and configuration.”
AWS: Disaster recovery options in the cloud

The data, restored

In Region B it is held as backups, and must be restored at failover.

  • Back to a point in time. “The backup should also offer a way to restore it to the point in time in which it was taken.” Among the services AWS lists for it: Amazon EBS snapshots, Amazon RDS snapshots, Amazon Aurora DB snapshots, and Amazon DynamoDB backups.
  • Versions in Amazon S3. “Object versioning protects your data in S3 from the consequences of deletion or modification actions by retaining the original version before the action.”
  • Restored ahead of time. “Implementing a scheduled periodic data restore is a good idea as data restore from backup is a control plane operation. If this operation was not available during a disaster, you would still have operable data stores created from a recent backup.”
AWS: Disaster recovery options in the cloud

The fleet, rebuilt

Amazon EC2 instances, launched in Region B from the copied images when the Region is rebuilt.

  • From an image. “The AMI is created from snapshots of your instance's root volume and any other EBS volumes attached to your instance. You can use this AMI to launch a restored version of the EC2 instance.”
  • Settings stay behind. AWS Backup also stores an EC2 backup's instance type, VPC, security group, IAM role, monitoring configuration and tags. “However, this additional metadata is only used when restoring the EC2 backup to the same AWS Region.”
  • A control plane step. “Control plane operations, such as launching an instance, creating a volume, or changing a DNS record, are complex orchestration.” AWS Well-Architected: REL11-BP04
  • Quotas do not follow. “Provisioned capacity, service quotas, and throttle limits are set per Region and do not replicate automatically.” AWS Well-Architected: REL13-BP04
AWS: Disaster recovery options in the cloud