Backup and Recovery
This page covers what the AlertD stack backs up on its own, how to extend those backups to a second AWS Region with AWS Backup, and how to rebuild AlertD from them, whether after an accidental deletion in the same Region or after the loss of a Region.
Recovery always means creating a new AlertD stack from your backed-up data. The stack is designed for this: a single parameter restores the database, and the other data is restored into the new stack afterwards. You never need to repair a broken stack in place.
What needs protecting
AlertD keeps its state in three places. Everything else in the stack (containers, load balancer, CloudFront, networking, IAM roles) is recreated from the template.
| Data | Stored in | What it holds | Importance |
|---|---|---|---|
| Database | Aurora PostgreSQL cluster <stack-name>-aurora-cluster | Users, settings, monitored accounts, collected metrics, findings, chat history. Everything AlertD knows. | Critical |
| Reports and storage | S3 bucket (stack output LoggingBucketName) | Generated reports and exports. | Important |
| Application data | EFS file system <stack-name>-app-data | Execution logs, diagnostics and the inputs and outputs of past analyses. | Useful for troubleshooting, not required to run |
The stack also creates two secrets: the API keys you entered at deployment and a signing key for user sessions. Neither needs backing up. API keys are entered again as parameters of the new stack. The signing key is generated fresh, which means users sign in again and previously shared links stop working.
What the stack backs up by default
These protections are in place as soon as the stack is created, within the same Region.
| Data | Built-in protection |
|---|---|
| Database | Aurora automated backups with 7 days of point-in-time recovery, taken daily between 03:00 and 04:00 UTC. Deleting the stack takes a final snapshot before the cluster is removed (unless you chose Retain DB and Bucket, in which case the cluster is kept). |
| Application data (EFS) | Automatic daily backups through AWS Backup, kept for 35 days, in the default EFS backup vault. |
| Reports (S3) | Versioning is enabled, so an overwritten or deleted file can be recovered for 1 day. |
These backups live in the same Region as AlertD. They protect you against mistakes and component failures, not against the loss of the Region.
Extend protection to a second Region with AWS Backup
AWS Backup can protect all three data stores from a single backup plan: it takes a snapshot of each on a schedule, keeps it in a vault in the AlertD Region, and copies it to a second vault in your recovery Region. Pick a recovery Region that AlertD supports (see the list of supported Regions).
The setup has three parts: a vault in the recovery Region, a plan in the AlertD Region, and the three resources assigned to that plan.
Step 1: Create the recovery vault
Encryption key for the recovery vault. The AlertD database is encrypted with the AWS managed key for RDS. AWS Backup can copy such snapshots to another Region, but only into a vault encrypted with a customer managed key that you own in the recovery Region (or with that Region’s aws/rds key). A vault that uses the default AWS Backup key (aws/backup) makes the database copy job fail. A customer managed key works for the database, the file system and the bucket alike, so one vault serves all three.
- Switch the console to the recovery Region
- Open KMS → Customer managed keys → Create key. Accept the defaults (symmetric, encrypt and decrypt), give it an alias such as
alertd-backup, and finish the wizard - Open AWS Backup → Backup vaults → Create backup vault. Name it, for example
alertd-dr, and under Encryption key choose the key you just created
Step 2: Create the backup plan
- Switch the console back to the AlertD Region
- Open AWS Backup → Backup plans → Create backup plan → Build a new plan and name it, for example
alertd - Under Backup rule configuration, add a rule:
- Backup vault: the Default vault, or create one in this Region
- Backup frequency:
Daily(chooseHourlyif you want a tighter recovery point for the bucket and file system; the database is still snapshotted at the plan’s rule frequency) - Backup window: a time outside your working hours
- Retention period: for example 7 days for the local copies
- Leave Enable continuous backups for point-in-time recovery unselected. Continuous backups cannot be used for cross-Region recovery
- Under Copy to destination, choose the recovery Region and the vault
alertd-dr, and set the retention for the copies (for example 30 days) - Click Create plan
Step 3: Assign the AlertD resources
- On the plan’s page, click Assign resources
- Name the assignment (for example
alertd-data) and keep the Default role - Under Resource selection, choose Include specific resource types and add:
- RDS → the cluster
<stack-name>-aurora-cluster - EFS → the file system
<stack-name>-app-data - S3 → the bucket named in the stack output
LoggingBucketName
- RDS → the cluster
- Click Assign resources
After the first scheduled run, confirm in AWS Backup → Jobs that the Backup jobs and Copy jobs tabs show one completed job per resource, and that the three recovery points appear in the alertd-dr vault in the recovery Region.
A few things to know about each resource:
- Database. Aurora is not supported by the “replicate automated backups” feature of Amazon RDS, which is why AWS Backup is the right tool. If you need a recovery point objective of seconds rather than hours, Aurora Global Database can keep a continuously replicated copy of the cluster in another Region; contact AlertD support before enabling it, as it changes how the stack is restored.
- File system. The existing automatic backups use a plan and vault reserved by EFS, which cannot copy to another Region. Adding the file system to your own plan does not interfere with them.
- Bucket. The first backup copies every object and can take a while; later backups only pick up changes. The bucket already has versioning enabled, which AWS Backup requires. If the first S3 backup job fails with a permissions error, attach the AWS managed policies
AWSBackupServiceRolePolicyForS3BackupandAWSBackupServiceRolePolicyForS3Restoreto the default AWS Backup role in IAM → Roles → AWSBackupDefaultServiceRole.
Alternative for the file system: EFS replication
If you want the application data to lag by minutes rather than hours, Amazon EFS can continuously replicate the file system to a read-only copy in another Region, with a recovery point objective of about 15 minutes. It works alongside AWS Backup.
- Open EFS → File systems →
<stack-name>-app-data → Replication → Create replication - Choose the recovery Region and let EFS create the destination file system
- Watch the TimeSinceLastSync metric in CloudWatch to confirm replication keeps up
Recovery procedures
Scenario 1: the stack was deleted by mistake (same Region)
With the default StackDeletePolicy, deleting the stack took a final snapshot of the database. The S3 bucket is only deleted if it was empty, and the EFS file system is deleted, so use the EFS backups if you need the application data back.
- Open RDS → Snapshots and find the final snapshot of the old cluster. Copy its name or ARN
- Deploy a new AlertD stack in the same Region, with Restore Database from Previous RDS Snapshot set to that snapshot. Keep the other parameters the same as before. Allow 15-30 minutes more than a normal deployment
- If the old bucket still exists, copy its contents into the new bucket. Otherwise restore the bucket and the file system from AWS Backup (see Restore reports and application data)
- Update your DNS record if you use a custom domain, or share the new application URL from the stack outputs
If you deployed with Retain DB and Bucket, the cluster, bucket, file system and VPC were kept instead, and the new stack can adopt them directly. Contact AlertD support for the import procedure.
Scenario 2: restore the database to an earlier point in time
Use this when data was corrupted or deleted inside AlertD and you want to go back to a moment within the last 7 days. The AlertD stack restores from snapshots, so a point-in-time restore is done in two steps:
- Open RDS → Databases →
<stack-name>-aurora-cluster → Actions → Restore to point in time, pick the moment you want and give the new cluster a temporary name. Wait for it to become available - Select the temporary cluster, then Actions → Take snapshot, and name it (for example
alertd-pitr-2026-10-15) - Create a new AlertD stack with Restore Database from Previous RDS Snapshot set to that snapshot, then delete the old stack and the temporary cluster once you are satisfied
Scenario 3: the AlertD Region is unavailable
This uses the cross-Region copies you set up above. Work entirely in the recovery Region.
- Prepare the Region. Make sure the ECS service-linked role exists (see the deployment prerequisites). If you use a custom domain, your ACM certificate is already in
us-east-1and can be reused - Find the database copy. Open AWS Backup → Backup vaults →
alertd-drand select the most recent RDS recovery point. Copy its ARN. It also appears under RDS → Snapshots with a name beginningawsbackup: - Deploy AlertD in the recovery Region with Restore Database from Previous RDS Snapshot set to that ARN and the other parameters matching your original stack. The new stack creates its own, empty bucket and file system
- Restore reports and application data into the new stack (next section)
- Switch users over. Point your custom domain’s CNAME at the new CloudFront domain name (stack output
CloudFrontDomainName), or share the newAlertDApplicationURL. Users sign in again
Keep the same value for Restore Database from Previous RDS Snapshot on every future update of the recovered stack. Clearing or changing it makes CloudFormation replace the database again.
Restore reports and application data
The new stack starts with an empty bucket and an empty file system. Restore into them from the alertd-dr vault as soon as the stack reaches CREATE_COMPLETE, before users return to the application. AWS Backup restores a copied recovery point in the Region where the copy lives, so stay in the recovery Region.
Reports (S3).
- Open AWS Backup → Backup vaults →
alertd-dr, select the most recent S3 recovery point and click Actions → Restore - Choose Restore entire bucket
- Under Restore destination, choose Use existing bucket and select the new stack’s bucket (stack output
LoggingBucketName) - Under Restored object encryption, choose Amazon S3 key (SSE-S3). The original keys cannot be used for a copy from another Region, and SSE-S3 is what the AlertD bucket uses
- Keep the default restore role and click Restore backup. Progress is shown under Jobs → Restore jobs
Application data (EFS).
- In the same vault, select the most recent EFS recovery point and click Actions → Restore
- Choose Restore to a new file system (keep the defaults) and start the restore. If you set up EFS replication instead, use the replica file system and skip this step
- Copy the restored data into the new stack’s file system with AWS DataSync, which supports EFS-to-EFS transfers in the console: open DataSync → Tasks → Create task, with the restored file system as source and the new stack’s file system (stack output
AppDataFileSystemId) as destination - Set the destination path to
/<your-account-id>/app/data, which is the folder the application mounts - Start the task and wait for it to complete, then delete the temporary restored file system
Recovery objectives
The figures below describe what the setup on this page achieves. They are estimates for planning, not guarantees.
| Data | Mechanism | Recovery point objective (data loss) | Recovery time objective |
|---|---|---|---|
| Database | AWS Backup daily copy | Up to 24 hours | 30-50 minutes (stack creation plus restore) |
| Reports | AWS Backup daily or hourly copy | Up to 24 hours, or 1 hour with an hourly rule | Added to the above: S3 restore job, usually minutes |
| Application data | AWS Backup daily or hourly copy | Up to 24 hours, or 1 hour with an hourly rule | Added to the above: EFS restore and DataSync copy |
| Application data | EFS replication | About 15 minutes | Added to the above: DataSync copy |
Rehearse it
A recovery plan that has never been run is a guess. Twice a year, create a stack in the recovery Region from the latest copied snapshot, restore the bucket into it, sign in, confirm your monitored accounts, findings and reports are there, and delete the test stack. The deployment takes under an hour and costs only what the stack uses while it exists.