Sub topic 11
Restoring a resource and verifying it
A backup you have never restored is only a guess. This chapter walks through restoring from a recovery point and checking that the result is usable. It assumes you know what a vault, a recovery point and the AWS Backup service role are, and that you can use the AWS CLI.
How a restore works
A restore never overwrites the original resource. AWS Backup creates a new resource from a recovery point. For an EBS volume, you get a new volume. For an RDS database, you get a new DB instance. You then decide whether to swap it in for the original.
Each restore needs three inputs:
- The recovery point ARN.
- Restore metadata, a set of key-value pairs that describes the new resource, such as its Availability Zone or instance name.
- An IAM role that AWS Backup assumes to create the resource.
Step 1: Find the recovery point and its metadata
List the recovery points in the vault, then fetch the metadata for the one you want.
aws backup list-recovery-points-by-backup-vault \
--backup-vault-name app-vault
aws backup get-recovery-point-restore-metadata \
--backup-vault-name app-vault \
--recovery-point-arn <recovery-point-arn>The response contains a RestoreMetadata map. The keys differ by resource type. Copy this map and change any values that should differ in the new resource.
Step 2: Start the restore job
Pass the metadata to start-restore-job. This example restores an EBS volume. Replace the placeholders with your values, and set the Availability Zone to one you can use.
aws backup start-restore-job \
--recovery-point-arn <recovery-point-arn> \
--iam-role-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole \
--metadata file://restore-metadata.jsonThe command returns a RestoreJobId. Check progress with aws backup describe-restore-job --restore-job-id <restore-job-id>. The status moves from PENDING to RUNNING and ends at COMPLETED or FAILED. When it completes, the output includes CreatedResourceArn, which identifies the new resource.
Step 3: Verify the result
A COMPLETED status only means the resource was created. It does not mean the data is correct. Check the following:
- Confirm the new resource exists and is in an available state.
- Attach or connect to it, for example mount the volume on a test instance.
- Check the data: file counts, row counts, or a known record.
- Compare the restore time with your recovery time objective (RTO).
Common errors
| Symptom | Likely cause |
|---|---|
| Restore job `FAILED` with an access error | The service role lacks restore permissions. Attach the `AWSBackupServiceRolePolicyForRestores` managed policy. |
| Encrypted restore fails | The role cannot use the KMS key that protects the backup. |
| Metadata rejected | A required key is missing, or a value such as a name already exists. |
| Restore is slow | Data in cold storage must be retrieved first, and some services restore in the background. |
Exercise
A restore job shows COMPLETED. Why is that not enough to call the backup good, and what should you check next?
Show answer
COMPLETED only means AWS Backup created the resource. You still need to confirm the data is intact and usable, for example by mounting the volume or querying the database and comparing known records. You should also check that the restore time meets your RTO.