RDS Backup Restore Operator
What this skill does
Executes RDS/Aurora backup and restore operations correctly and safely.
Runs deterministic pre-checks before any state-changing CLI, executes the
operation behind a CONFIRM gate, and verifies the result. Every restore
produces a NEW endpoint (except Aurora Backtrack, which is in-place) — the
skill always surfaces the connection-string update step.
Quick navigation
| Section |
What it covers |
When to read it |
| § Quick reference |
Verdict thresholds (BLOCKED/READY/COMPLETED) + pre-check priority order |
Before any operation |
| § Mindset |
Why pre-checks matter, the new-endpoint surprise, the confirm gate |
Understanding the safety model |
| § Pre-flight |
Instance metadata gate — status, retention, snapshot, VPC resources |
Before executing any CLI |
| § Process |
Per-operation planning: backup, snapshot, PITR, backtrack, S3 export/import |
When choosing which operation to run |
| § Output format |
Structured output template with VERDICT, COMMANDS, ENDPOINT, VERIFICATION |
Formatting the response |
| § Anti-Patterns |
NEVER list — common mistakes that cause data loss or silent failures |
Review before risky operations |
| § Pre-flight safety |
Additional checks before any remediation CLI |
Defense-in-depth |
Quick reference — verdict thresholds
| Verdict |
Trigger condition |
Action |
BLOCKED |
One or more pre-checks failed (missing subnet/SG/option group, retention=0 for PITR, instance not available, KMS key inaccessible) |
List failures, do NOT execute |
READY |
All pre-checks passed; awaiting CONFIRM gate |
Emit exact CLI sequence, wait for operator yes |
COMPLETED |
Operation finished and post-verification passed |
Emit endpoint, verification results, cleanup steps |
Priority order for pre-checks (apply in this sequence, all must pass for
READY):
- Instance/cluster status — must be
available (or backing-up for
read operations). modifying, upgrading, creating, deleting → BLOCKED.
- Backup retention — PITR requires retention > 0; otherwise BLOCKED with
"PITR disabled".
- Snapshot existence — restore operations require an existing snapshot
or a valid PITR window.
- Target VPC resources — subnet group, security group, option group,
parameter group, KMS key all must exist in the target.
- Capacity and quota — DB instance class available in target AZ,
snapshot copy quota not exceeded.
Cost/time baselines (2026):
- Snapshot create time: ~1 min per 100 GB (storage-bound).
- Snapshot restore time: ~30-90 min for 1 TB (proportional to data size).
- Aurora Backtrack: seconds to minutes, regardless of cluster size.
- Cross-region snapshot copy: data-transfer fee ($0.02/GB cross-region) +
destination-region storage.
- S3 export: ~$0.025/GB-hour for the export task; writes Parquet to S3.
Mindset
One-line takeaway: restore always creates a new instance with a new
endpoint — except Aurora Backtrack, which is an in-place rewind. Driven by
three RDS realities:
- Restore is non-destructive by default.
restore-db-instance-to-point-in-time
and restore-db-instance-from-db-snapshot create a NEW instance with a NEW
endpoint. The original is unchanged. Operators who expect an in-place rewind
are surprised by the new endpoint and the duplicate instance bill.
- PITR requires retention > 0. Setting
BackupRetentionPeriod: 0 disables
automated backups entirely AND disables PITR. The 5-minute transaction log
shipping stops; the recovery point reverts to the last manual snapshot.
- Aurora Backtrack is the only in-place rewind. Aurora MySQL clusters with
BacktrackWindow > 0 can rewind in seconds without restoring from a
snapshot. Aurora PostgreSQL does NOT support Backtrack — use PITR or fast
clone instead.
Pre-flight: instance metadata gate
Run before classification. Misclassifying these produces wrong plans.
Pagination: describe-db-instances paginates at 100/page — drain
--marker (or --starting-token for the AWS CLI v2 pagination syntax) to
completion. describe-db-snapshots paginates at 100/page similarly.
Live-account pre-flight (skip if offline plan audit):
Live-account pre-flight commands 1-8 moved verbatim to
references/diagnostic-commands.md.
Malformed input: if the input JSON is invalid or missing required fields,
emit VERDICT: ERROR with REASON: Instance/operation configuration is not valid JSON or is missing required fields — cannot plan. and
REMEDIATION: Re-fetch with aws rds describe-db-instances --db-instance-identifier <id> --output json and re-plan.
| Instance attribute |
Effect on operation |
DBInstanceStatus: available |
Pre-check passes for stateful operations. |
DBInstanceStatus: modifying, upgrading, creating, deleting, backing-up |
BLOCKED — wait for available (or storage-optimization for non-stateful ops). |
DBInstanceStatus: failed, incompatible-restore |
BLOCKED — instance cannot serve as restore source. |
MultiAZ: true |
Automated backups run from the standby for MySQL/PostgreSQL; no perf impact on primary. |
StorageEncrypted: true |
Restore requires KMS key access in the target. Cross-account restore needs the source account's KMS key policy grant. |
BackupRetentionPeriod: 0 |
PITR BLOCKED — automated backups disabled. Only manual snapshot restore is available. |
BackupRetentionPeriod: 1-35 |
PITR window is now - retention to ~5 min ago. |
Engine: aurora-mysql |
Backtrack available if BacktrackWindow > 0. Fast clone available. |
Engine: aurora-postgresql |
Backtrack NOT supported. Use PITR or fast clone. |
Engine: mysql, postgres, oracle, sqlserver, mariadb |
Standard RDS; no Backtrack, no fast clone. |
DBSubnetGroup missing or Subnets: [] |
Restore BLOCKED — no target subnets. |
OptionGroupMemberships referencing deleted option group |
Restore BLOCKED — create matching option group first. |
DBParameterGroups referencing deleted parameter group |
Restore BLOCKED — create matching parameter group first. |
GlobalClusterMember (Aurora Global Database) |
Restoring a primary requires promoting a secondary or removing from global cluster first. |
ActivityStreamStatus: started (Database Activity Streams) |
Restore BLOCKED — stop the activity stream first; resume after restore. |
ReplicaSource set (read replica) |
Restoring a read replica is unusual; surface as a finding. |
Process — operation planning (apply in order)
Step 0: Expert knowledge — non-obvious RDS/Aurora behaviors
Step 0 expert-knowledge catalog (non-obvious RDS/Aurora behaviors) moved verbatim to
references/advanced-patterns.md.
Step 1: Pre-check gate — BLOCKED if any check fails
Run ALL of the following pre-checks. If ANY fails, the verdict is BLOCKED
with the failed checks enumerated in PRE_CHECKS. Do NOT execute the
operation.
For ALL operations:
DBInstanceStatus (or DBClusterStatus for Aurora) is available (or
backing-up/storage-optimization for read-only operations).
- The operation is not already in progress (no concurrent snapshot create
for the same instance).
- IAM role for the operator holds the required RDS permissions.
- Service quota for the operation is not exceeded (snapshot quota, instance
quota, copy quota).
For snapshot create (create-db-snapshot):
5. Instance is in available state (not modifying or creating).
6. No existing manual snapshot with the same --db-snapshot-identifier.
For PITR restore (restore-db-instance-to-point-in-time):
5. BackupRetentionPeriod > 0 on the source instance.
6. LatestRestorableTime >= --restore-time >= EarliestRestorableTime.
7. Target --db-instance-identifier does NOT already exist (restore creates
a new identifier).
8. Target DB subnet group exists and has subnets in >= 2 AZs (recommended).
9. Target security group exists in the same VPC as the subnet group.
10. Target option group matches the engine + engine-version.
11. Target parameter group matches the engine + engine-version.
12. KMS key (if encrypted) is accessible: kms:Decrypt, kms:CreateGrant.
For snapshot restore (restore-db-instance-from-db-snapshot):
5. Snapshot exists (describe-db-snapshots --db-snapshot-identifier <id>).
6. Snapshot status is available.
7. Target --db-instance-identifier does NOT already exist.
8. Target DB subnet group, security group, option group, parameter group,
KMS key — all exist and match.
For Aurora backtrack (backtrack-db-cluster):
5. Engine is aurora-mysql (PostgreSQL does NOT support backtrack).
6. BacktrackWindow > 0 on the cluster.
7. --backtrack-to-timestamp is within [now - BacktrackWindow, now].
8. Cluster is NOT in a Global Database as the writer ( backtrack a writer in
a global cluster requires special handling — surface as a finding).
9. No existing backtrack in progress for the cluster.
For S3 export (start-export-task):
5. Snapshot exists and is available.
6. --role-arn trusts rds.amazonaws.com.
7. --s3-bucket-name exists and the role has s3:PutObject + s3:ListBucket.
8. KMS key (if specified) is accessible to the role.
For S3 import (start-import-from-s3):
5. Target Aurora MySQL cluster exists and is available.
6. Source S3 bucket is in the same region as the cluster.
7. The cluster's role has s3:GetObject + s3:ListBucket on the source.
8. The data format matches --type (CSV, etc.).
Step 2: READY — emit operation plan
If all pre-checks pass, emit VERDICT: READY with the exact CLI sequence
and the CONFIRM gate. The plan includes:
- The exact AWS CLI command with all flags populated from the source instance
configuration.
- The expected duration (snapshot create ~1 min/100 GB, restore 30-90 min/TB,
backtrack seconds-to-minutes).
- The expected side-effects (new endpoint for restore, in-place rewind for
backtrack, new export task ID for S3 export).
- The CONFIRM gate prompt.
Step 3: Execute behind CONFIRM gate
- MANDATORY CONFIRMATION GATE. Before any state-changing CLI, emit:
CONFIRM: About to <operation> on <instance/cluster/snapshot> in account <account> region <region>. This will <consequence>. Proceed? (yes/no).
Do NOT execute until the operator confirms.
- Capture pre-state for rollback:
aws rds describe-db-instances --db-instance-identifier <id> --output json > /tmp/<id>-pre-$(date +%s).json.
- Execute the CLI. Capture the operation ID (snapshot ID, restore ARN,
backtrack ID, export task ID).
- For long-running operations, wait via
aws rds wait db-instance-available --db-instance-identifier <new-id> (or the appropriate waiter).
Step 4: Post-verification — COMPLETED
After the operation finishes, run post-verification. ALL checks must pass
for COMPLETED.
describe-db-instances --db-instance-identifier <new-id> — confirm
DBInstanceStatus: available.
- Test connectivity to the new endpoint:
psql, mysql, or sqlcmd as
appropriate. The endpoint is in the Endpoint.Address field.
- Verify data consistency: row count on a known table, checksum on a known
dataset, or query a sentinel row.
- Verify the restore point matches the intended time (for PITR).
- Verify option group, parameter group, security group applied correctly.
- Surface the connection-string update step (new endpoint).
- Clean up temporary instances if the operation was a verification restore.
- For backtrack: verify the cluster rewound to the target timestamp via
CloudTrail or a sentinel row.
If ANY verification fails, emit VERDICT: ERROR with the failure details —
do not claim COMPLETED.
Output format (per operation)
OPERATION: <create-snapshot | pitr-restore | snapshot-restore | backtrack | export | import>
VERDICT: READY | BLOCKED | COMPLETED
TARGET: <instance-id, cluster-id, snapshot-id>
PRE_CHECKS:
- [PASS] <check description>
- [FAIL] <check description> — <reason>
STEPS:
1. <CLI command with flags populated>
2. <wait command>
3. <next step>
POST_VERIFY:
- [PASS] <verification description>
- [FAIL] <verification description> — <reason>
ENDPOINT: <new endpoint if restore, "unchanged" if backtrack>
NOTES: <connection-string update, cleanup, caveats>
Worked example — PITR restore
OPERATION: pitr-restore
VERDICT: READY
TARGET: prod-orders-db -> prod-orders-db-pitr-2026-08-07
PRE_CHECKS:
- [PASS] prod-orders-db DBInstanceStatus is available
- [PASS] BackupRetentionPeriod is 7 (> 0, PITR enabled)
- [PASS] RestoreTime 2026-08-07T10:00:00Z is within window
[2026-07-31T00:00:00Z, 2026-08-07T10:55:00Z]
- [PASS] Target identifier prod-orders-db-pitr-2026-08-07 does not exist
- [PASS] DB subnet group prod-subnet-group has subnets in 3 AZs
- [PASS] Security group sg-prod-rds exists in vpc-vpc-12345
- [PASS] Option group default:mysql-8-0 matches engine mysql 8.0.x
- [PASS] Parameter group prod-mysql80 matches engine mysql 8.0.x
- [PASS] KMS key arn:aws:kms:us-east-1:111111111111:key/prod-key accessible
STEPS:
1. CONFIRM: About to restore-db-instance-to-point-in-time on prod-orders-db
to 2026-08-07T10:00:00Z, creating prod-orders-db-pitr-2026-08-07 in
account 111111111111 region us-east-1. This will create a new instance
with a new endpoint (original unchanged). Estimated duration: 60-90
minutes. Proceed? (yes/no)
2. aws rds restore-db-instance-to-point-in-time \
--source-db-instance-identifier prod-orders-db \
--target-db-instance-identifier prod-orders-db-pitr-2026-08-07 \
--restore-time 2026-08-07T10:00:00Z \
--db-subnet-group-name prod-subnet-group \
--vpc-security-group-ids sg-prod-rds \
--option-group-name default:mysql-8-0 \
--db-parameter-group-name prod-mysql80 \
--no-deletion-protection \
--tags Key=restored-from,Value=prod-orders-db Key=restore-reason,Value=bad-migration
3. aws rds wait db-instance-available \
--db-instance-identifier prod-orders-db-pitr-2026-08-07
POST_VERIFY:
- (pending execution)
ENDPOINT: (pending — will be prod-orders-db-pitr-2026-08-07.<random>.us-east-1.rds.amazonaws.com)
NOTES:
- The new instance has a NEW endpoint. Update application connection strings.
- The original prod-orders-db is unchanged and continues to bill.
- Set --deletion-protection on the new instance once verified.
- Plan cleanup: delete the restored instance after migration cutover.
Worked example — pre-check failure
The pre-check-failure (BLOCKED) worked example moved verbatim to
references/worked-examples.md.
Worked example — Aurora backtrack
The Aurora backtrack worked example moved verbatim to
references/worked-examples.md.
Anti-Patterns — NEVER
NEVER execute restore-db-instance-to-point-in-time or
restore-db-instance-from-db-snapshot without explicitly surfacing that
a NEW instance and NEW endpoint will be created. Operators who expect an
in-place rewind will miss the connection-string update step and break
their application.
NEVER attempt PITR on an instance with BackupRetentionPeriod: 0. There
are no transaction logs and no recoverable window. Always check retention
first and BLOCK with the modify-db-instance remediation if PITR is the
goal.
NEVER assume Aurora PostgreSQL supports Backtrack. Only Aurora MySQL
supports Backtrack. For Aurora PostgreSQL, use PITR or fast clone.
NEVER execute restore-db-instance-to-point-in-time with
--restore-time outside the retention window. Always verify
LatestRestorableTime and EarliestRestorableTime via
describe-db-instances first; the API returns
InvalidParameterValue if outside the window.
NEVER skip the target-resource pre-checks (subnet group, security group,
option group, parameter group, KMS key). A restore with a missing subnet
group fails after the snapshot download — wasting 30+ minutes. Always
verify all target resources exist before executing.
NEVER share an encrypted snapshot cross-account without verifying the KMS
key policy grants the recipient kms:Decrypt and kms:CreateGrant. The
snapshot share alone is insufficient — the recipient can describe the
snapshot but cannot restore from it.
NEVER copy a snapshot cross-region without surfacing the cost. Cross-region
copy bills $0.02/GB data transfer plus destination-region storage. A 1 TB
snapshot copied to 3 DR regions is $60 in transfer + 3 TB-month of
destination storage.
NEVER delete the original instance after a PITR or snapshot restore until
the new instance is verified AND application traffic is cut over. Restore
is non-destructive by design; deleting the original prematurely is the
most common cause of prolonged downtime during recovery.
NEVER recommend setting BackupRetentionPeriod: 0 to "save backup costs."
This disables PITR entirely and is irreversible for the unbacked-up
period. The cost saving is negligible; the recovery exposure is total.
NEVER restore into the same DB subnet group with insufficient AZs. RDS
recommends subnets in >= 2 AZs for Multi-AZ; restoring into a single-AZ
subnet group blocks Multi-AZ and reduces availability.
NEVER skip the post-restore verification. A restore that returns
available may still have data inconsistency (partial transaction log
replay, parameter group mismatch). Always verify with a row count,
checksum, or sentinel query.
NEVER execute backtrack-db-cluster on a writer in an Aurora Global
Database without special handling. Backtracking the writer can desync
the global cluster — surface as a finding and recommend detaching from
the global cluster first.
NEVER assume Aurora Fast Clone is free. The clone shares storage at
creation (instant), but divergent writes accrue new storage — a long-
lived clone can double the storage bill. Always plan clone cleanup.
NEVER auto-execute a state-changing RDS CLI without the CONFIRM gate.
Restore, snapshot create, backtrack, and export all have side effects
(new instance bill, in-place rewind, export task charges). Always emit
CONFIRM and wait.
NEVER trust describe-db-instances DBInstanceStatus: available alone
for PITR readiness. An instance can be available with retention=0
(no automated backups). Always check BackupRetentionPeriod and
LatestRestorableTime independently.
Pre-flight safety checks (run before any remediation CLI)
The full pre-flight safety check catalog (confirm gate, pre-state capture,
target/retention/KMS verification) moved verbatim to references/diagnostic-commands.md.
Recent AWS features (2024-2026)
Recent AWS feature notes (2024-2026) moved verbatim to
references/advanced-patterns.md.
References (load on demand)
- references/worked-examples.md — the BLOCKED pre-check-failure and Aurora backtrack worked examples (moved from this file; the PITR worked example stays in this file)
- references/diagnostic-commands.md — live-account pre-flight commands 1-8, pre-flight safety check catalog with confirm-gate and rollback capture (moved from this file)
- references/advanced-patterns.md — Step 0 expert-knowledge catalog of non-obvious RDS/Aurora behaviors, recent AWS features 2024-2026 (moved from this file)
- references/restore-procedures.md — per-operation CLI procedures: PITR, snapshot restore, Aurora backtrack, fast clone, cross-region copy
Domain
AWS CloudOps / RDS & Aurora Backup, Restore & Disaster Recovery.
AWS documentation
1---2name: rds-backup-restore-operator3description: Operates RDS and Aurora backup and restore workflows safely — automated backup window configuration, manual snapshots for pre-maintenance safety, cross-region and cross-account snapshot copy, point-in-time restore (PITR), Aurora Backtrack for in-place rewind, S3 export/import, and full post- restore verification. Runs deterministic pre-checks (subnet group, security group, option group, KMS key, instance status), executes the operation behind a CONFIRM gate, and emits a verdict (READY | BLOCKED | COMPLETED) per operation with the exact CLI sequence, expected side-effects (new instance endpoint, connection-string updates), and verification commands. Use when configuring RDS backup retention, creating pre-migration snapshots, restoring to a point in time, backtracking an Aurora cluster, exporting a snapshot to S3, or recovering from a bad change.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws rds describe-db-instances, aws rds describe-db-snapshots, aws rds describe-db-cluster-backtracks, aws rds create-db-snapshot, aws rds restore-db-instance-to-point-in-time, aws rds restore-db-instance-from-db- snapshot, aws rds backtrack-db-cluster, aws rds start-export-task, and aws rds start-import-from-s3 (AWS CLI v2, SSO or...6metadata:7 source: https://skillmd.com/skills/jhkchan/rds-backup-restore-operator8 domain: aws-cloudops9 complexity: medium10 requires_llm: 'true'11 phase: '4'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Databases15 task_type: operate16 skill_class: capability17 verdict_shape: READY | BLOCKED | COMPLETED18 when_to_use: Configuring RDS backup retention or backup window, creating a manual snapshot before maintenance or a risky change, copying snapshots cross- region or cross-account, restoring an RDS instance to a point in time, restoring from a snapshot, backtracking an Aurora MySQL cluster, exporting a snapshot to S3, importing from S3 into Aurora MySQL, or recovering from a bad schema change.19 activation_triggers: configure RDS backup retention, create RDS manual snapshot, restore RDS to point in time, PITR restore RDS, restore RDS from snapshot, backtrack Aurora cluster, Aurora fast clone, copy RDS snapshot cross-region, share RDS snapshot cross-account, export RDS snapshot to S3, import S3 into Aurora MySQL, RDS pre-migration snapshot, recover from bad RDS change, verify RDS restore20 invocation_schema: 'Input: either (a) an RDS instance/cluster configuration with the intended operation (create-snapshot, pitr-restore, snapshot-restore, backtrack, export, import), OR (b) an instance-id / cluster-id + operation for live-account execution. Output: deterministic OPERATION/VERDICT/PRE_CHECKS/ STEPS/POST_VERIFY block per operation, where VERDICT is one of READY, BLOCKED, COMPLETED.'21 version: 0.1.022 author: Jacky Chan — AWS Community Builder23 keywords: RDS, Amazon Aurora, Aurora MySQL, Aurora PostgreSQL, automated backup, manual snapshot, point-in-time recovery, PITR, backtrack, fast database clone, cross-region snapshot copy, cross-account snapshot share, S3 export, S3 import, backup retention, backup window, maintenance window, Multi-AZ, restore-db-instance-to-point-in-time, restore-db-instance-from-db-snapshot, backtrack-db-cluster, create-db-snapshot, start-export-task24 tags: rds, aurora, databases, backup, restore, pitr, backtrack, snapshot, recovery, disaster-recovery25---2627# RDS Backup Restore Operator2829## What this skill does3031Executes RDS/Aurora backup and restore operations correctly and safely.32Runs deterministic pre-checks before any state-changing CLI, executes the33operation behind a CONFIRM gate, and verifies the result. Every restore34produces a NEW endpoint (except Aurora Backtrack, which is in-place) — the35skill always surfaces the connection-string update step.3637## Quick navigation3839| Section | What it covers | When to read it |40|---|---|---|41| **§ Quick reference** | Verdict thresholds (BLOCKED/READY/COMPLETED) + pre-check priority order | Before any operation |42| **§ Mindset** | Why pre-checks matter, the new-endpoint surprise, the confirm gate | Understanding the safety model |43| **§ Pre-flight** | Instance metadata gate — status, retention, snapshot, VPC resources | Before executing any CLI |44| **§ Process** | Per-operation planning: backup, snapshot, PITR, backtrack, S3 export/import | When choosing which operation to run |45| **§ Output format** | Structured output template with VERDICT, COMMANDS, ENDPOINT, VERIFICATION | Formatting the response |46| **§ Anti-Patterns** | NEVER list — common mistakes that cause data loss or silent failures | Review before risky operations |47| **§ Pre-flight safety** | Additional checks before any remediation CLI | Defense-in-depth |4849## Quick reference — verdict thresholds5051| Verdict | Trigger condition | Action |52|---|---|---|53| `BLOCKED` | One or more pre-checks failed (missing subnet/SG/option group, retention=0 for PITR, instance not available, KMS key inaccessible) | List failures, do NOT execute |54| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |55| `COMPLETED` | Operation finished and post-verification passed | Emit endpoint, verification results, cleanup steps |5657**Priority order for pre-checks (apply in this sequence, all must pass for58READY):**59601. **Instance/cluster status** — must be `available` (or `backing-up` for61 read operations). `modifying`, `upgrading`, `creating`, `deleting` → BLOCKED.622. **Backup retention** — PITR requires retention > 0; otherwise BLOCKED with63 "PITR disabled".643. **Snapshot existence** — restore operations require an existing snapshot65 or a valid PITR window.664. **Target VPC resources** — subnet group, security group, option group,67 parameter group, KMS key all must exist in the target.685. **Capacity and quota** — DB instance class available in target AZ,69 snapshot copy quota not exceeded.7071**Cost/time baselines (2026):**7273- Snapshot create time: ~1 min per 100 GB (storage-bound).74- Snapshot restore time: ~30-90 min for 1 TB (proportional to data size).75- Aurora Backtrack: seconds to minutes, regardless of cluster size.76- Cross-region snapshot copy: data-transfer fee ($0.02/GB cross-region) +77 destination-region storage.78- S3 export: ~$0.025/GB-hour for the export task; writes Parquet to S3.7980## Mindset8182**One-line takeaway:** restore always creates a new instance with a new83endpoint — except Aurora Backtrack, which is an in-place rewind. Driven by84three RDS realities:8586- **Restore is non-destructive by default.** `restore-db-instance-to-point-in-time`87 and `restore-db-instance-from-db-snapshot` create a NEW instance with a NEW88 endpoint. The original is unchanged. Operators who expect an in-place rewind89 are surprised by the new endpoint and the duplicate instance bill.90- **PITR requires retention > 0.** Setting `BackupRetentionPeriod: 0` disables91 automated backups entirely AND disables PITR. The 5-minute transaction log92 shipping stops; the recovery point reverts to the last manual snapshot.93- **Aurora Backtrack is the only in-place rewind.** Aurora MySQL clusters with94 `BacktrackWindow` > 0 can rewind in seconds without restoring from a95 snapshot. Aurora PostgreSQL does NOT support Backtrack — use PITR or fast96 clone instead.9798## Pre-flight: instance metadata gate99100Run before classification. Misclassifying these produces wrong plans.101102**Pagination:** `describe-db-instances` paginates at 100/page — drain103`--marker` (or `--starting-token` for the AWS CLI v2 pagination syntax) to104completion. `describe-db-snapshots` paginates at 100/page similarly.105106**Live-account pre-flight (skip if offline plan audit):**107Live-account pre-flight commands 1-8 moved verbatim to108[references/diagnostic-commands.md](references/diagnostic-commands.md).109110**Malformed input:** if the input JSON is invalid or missing required fields,111emit `VERDICT: ERROR` with `REASON: Instance/operation configuration is not112valid JSON or is missing required fields — cannot plan.` and113`REMEDIATION: Re-fetch with aws rds describe-db-instances --db-instance-identifier114<id> --output json and re-plan.`115116| Instance attribute | Effect on operation |117|---|---|118| `DBInstanceStatus: available` | Pre-check passes for stateful operations. |119| `DBInstanceStatus: modifying, upgrading, creating, deleting, backing-up` | BLOCKED — wait for `available` (or `storage-optimization` for non-stateful ops). |120| `DBInstanceStatus: failed, incompatible-restore` | BLOCKED — instance cannot serve as restore source. |121| `MultiAZ: true` | Automated backups run from the standby for MySQL/PostgreSQL; no perf impact on primary. |122| `StorageEncrypted: true` | Restore requires KMS key access in the target. Cross-account restore needs the source account's KMS key policy grant. |123| `BackupRetentionPeriod: 0` | PITR BLOCKED — automated backups disabled. Only manual snapshot restore is available. |124| `BackupRetentionPeriod: 1-35` | PITR window is `now - retention` to `~5 min ago`. |125| `Engine: aurora-mysql` | Backtrack available if `BacktrackWindow > 0`. Fast clone available. |126| `Engine: aurora-postgresql` | Backtrack NOT supported. Use PITR or fast clone. |127| `Engine: mysql, postgres, oracle, sqlserver, mariadb` | Standard RDS; no Backtrack, no fast clone. |128| `DBSubnetGroup` missing or `Subnets: []` | Restore BLOCKED — no target subnets. |129| `OptionGroupMemberships` referencing deleted option group | Restore BLOCKED — create matching option group first. |130| `DBParameterGroups` referencing deleted parameter group | Restore BLOCKED — create matching parameter group first. |131| `GlobalClusterMember` (Aurora Global Database) | Restoring a primary requires promoting a secondary or removing from global cluster first. |132| `ActivityStreamStatus: started` (Database Activity Streams) | Restore BLOCKED — stop the activity stream first; resume after restore. |133| `ReplicaSource` set (read replica) | Restoring a read replica is unusual; surface as a finding. |134135## Process — operation planning (apply in order)136137### Step 0: Expert knowledge — non-obvious RDS/Aurora behaviors138139Step 0 expert-knowledge catalog (non-obvious RDS/Aurora behaviors) moved verbatim to140[references/advanced-patterns.md](references/advanced-patterns.md).141142### Step 1: Pre-check gate — BLOCKED if any check fails143144Run ALL of the following pre-checks. If ANY fails, the verdict is BLOCKED145with the failed checks enumerated in PRE_CHECKS. Do NOT execute the146operation.147148**For ALL operations:**1491. `DBInstanceStatus` (or `DBClusterStatus` for Aurora) is `available` (or150 `backing-up`/`storage-optimization` for read-only operations).1512. The operation is not already in progress (no concurrent snapshot create152 for the same instance).1533. IAM role for the operator holds the required RDS permissions.1544. Service quota for the operation is not exceeded (snapshot quota, instance155 quota, copy quota).156157**For snapshot create (`create-db-snapshot`):**1585. Instance is in `available` state (not `modifying` or `creating`).1596. No existing manual snapshot with the same `--db-snapshot-identifier`.160161**For PITR restore (`restore-db-instance-to-point-in-time`):**1625. `BackupRetentionPeriod > 0` on the source instance.1636. `LatestRestorableTime` >= `--restore-time` >= `EarliestRestorableTime`.1647. Target `--db-instance-identifier` does NOT already exist (restore creates165 a new identifier).1668. Target DB subnet group exists and has subnets in >= 2 AZs (recommended).1679. Target security group exists in the same VPC as the subnet group.16810. Target option group matches the engine + engine-version.16911. Target parameter group matches the engine + engine-version.17012. KMS key (if encrypted) is accessible: `kms:Decrypt`, `kms:CreateGrant`.171172**For snapshot restore (`restore-db-instance-from-db-snapshot`):**1735. Snapshot exists (`describe-db-snapshots --db-snapshot-identifier <id>`).1746. Snapshot status is `available`.1757. Target `--db-instance-identifier` does NOT already exist.1768. Target DB subnet group, security group, option group, parameter group,177 KMS key — all exist and match.178179**For Aurora backtrack (`backtrack-db-cluster`):**1805. Engine is `aurora-mysql` (PostgreSQL does NOT support backtrack).1816. `BacktrackWindow` > 0 on the cluster.1827. `--backtrack-to-timestamp` is within `[now - BacktrackWindow, now]`.1838. Cluster is NOT in a Global Database as the writer ( backtrack a writer in184 a global cluster requires special handling — surface as a finding).1859. No existing backtrack in progress for the cluster.186187**For S3 export (`start-export-task`):**1885. Snapshot exists and is `available`.1896. `--role-arn` trusts `rds.amazonaws.com`.1907. `--s3-bucket-name` exists and the role has `s3:PutObject` + `s3:ListBucket`.1918. KMS key (if specified) is accessible to the role.192193**For S3 import (`start-import-from-s3`):**1945. Target Aurora MySQL cluster exists and is `available`.1956. Source S3 bucket is in the same region as the cluster.1967. The cluster's role has `s3:GetObject` + `s3:ListBucket` on the source.1978. The data format matches `--type` (CSV, etc.).198199### Step 2: READY — emit operation plan200201If all pre-checks pass, emit `VERDICT: READY` with the exact CLI sequence202and the CONFIRM gate. The plan includes:203204- The exact AWS CLI command with all flags populated from the source instance205 configuration.206- The expected duration (snapshot create ~1 min/100 GB, restore 30-90 min/TB,207 backtrack seconds-to-minutes).208- The expected side-effects (new endpoint for restore, in-place rewind for209 backtrack, new export task ID for S3 export).210- The CONFIRM gate prompt.211212### Step 3: Execute behind CONFIRM gate213214- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI, emit:215 `CONFIRM: About to <operation> on <instance/cluster/snapshot> in account216 <account> region <region>. This will <consequence>. Proceed? (yes/no)`.217 Do NOT execute until the operator confirms.218- Capture pre-state for rollback: `aws rds describe-db-instances --db-instance-identifier219 <id> --output json > /tmp/<id>-pre-$(date +%s).json`.220- Execute the CLI. Capture the operation ID (snapshot ID, restore ARN,221 backtrack ID, export task ID).222- For long-running operations, wait via `aws rds wait db-instance-available223 --db-instance-identifier <new-id>` (or the appropriate waiter).224225### Step 4: Post-verification — COMPLETED226227After the operation finishes, run post-verification. ALL checks must pass228for `COMPLETED`.2292301. `describe-db-instances --db-instance-identifier <new-id>` — confirm231 `DBInstanceStatus: available`.2322. Test connectivity to the new endpoint: `psql`, `mysql`, or `sqlcmd` as233 appropriate. The endpoint is in the `Endpoint.Address` field.2343. Verify data consistency: row count on a known table, checksum on a known235 dataset, or query a sentinel row.2364. Verify the restore point matches the intended time (for PITR).2375. Verify option group, parameter group, security group applied correctly.2386. Surface the connection-string update step (new endpoint).2397. Clean up temporary instances if the operation was a verification restore.2408. For backtrack: verify the cluster rewound to the target timestamp via241 CloudTrail or a sentinel row.242243If ANY verification fails, emit `VERDICT: ERROR` with the failure details —244do not claim COMPLETED.245246## Output format (per operation)247248```text249OPERATION: <create-snapshot | pitr-restore | snapshot-restore | backtrack | export | import>250VERDICT: READY | BLOCKED | COMPLETED251TARGET: <instance-id, cluster-id, snapshot-id>252PRE_CHECKS:253 - [PASS] <check description>254 - [FAIL] <check description> — <reason>255STEPS:256 1. <CLI command with flags populated>257 2. <wait command>258 3. <next step>259POST_VERIFY:260 - [PASS] <verification description>261 - [FAIL] <verification description> — <reason>262ENDPOINT: <new endpoint if restore, "unchanged" if backtrack>263NOTES: <connection-string update, cleanup, caveats>264```265266### Worked example — PITR restore267268```text269OPERATION: pitr-restore270VERDICT: READY271TARGET: prod-orders-db -> prod-orders-db-pitr-2026-08-07272PRE_CHECKS:273 - [PASS] prod-orders-db DBInstanceStatus is available274 - [PASS] BackupRetentionPeriod is 7 (> 0, PITR enabled)275 - [PASS] RestoreTime 2026-08-07T10:00:00Z is within window276 [2026-07-31T00:00:00Z, 2026-08-07T10:55:00Z]277 - [PASS] Target identifier prod-orders-db-pitr-2026-08-07 does not exist278 - [PASS] DB subnet group prod-subnet-group has subnets in 3 AZs279 - [PASS] Security group sg-prod-rds exists in vpc-vpc-12345280 - [PASS] Option group default:mysql-8-0 matches engine mysql 8.0.x281 - [PASS] Parameter group prod-mysql80 matches engine mysql 8.0.x282 - [PASS] KMS key arn:aws:kms:us-east-1:111111111111:key/prod-key accessible283STEPS:284 1. CONFIRM: About to restore-db-instance-to-point-in-time on prod-orders-db285 to 2026-08-07T10:00:00Z, creating prod-orders-db-pitr-2026-08-07 in286 account 111111111111 region us-east-1. This will create a new instance287 with a new endpoint (original unchanged). Estimated duration: 60-90288 minutes. Proceed? (yes/no)289 2. aws rds restore-db-instance-to-point-in-time \290 --source-db-instance-identifier prod-orders-db \291 --target-db-instance-identifier prod-orders-db-pitr-2026-08-07 \292 --restore-time 2026-08-07T10:00:00Z \293 --db-subnet-group-name prod-subnet-group \294 --vpc-security-group-ids sg-prod-rds \295 --option-group-name default:mysql-8-0 \296 --db-parameter-group-name prod-mysql80 \297 --no-deletion-protection \298 --tags Key=restored-from,Value=prod-orders-db Key=restore-reason,Value=bad-migration299 3. aws rds wait db-instance-available \300 --db-instance-identifier prod-orders-db-pitr-2026-08-07301POST_VERIFY:302 - (pending execution)303ENDPOINT: (pending — will be prod-orders-db-pitr-2026-08-07.<random>.us-east-1.rds.amazonaws.com)304NOTES:305 - The new instance has a NEW endpoint. Update application connection strings.306 - The original prod-orders-db is unchanged and continues to bill.307 - Set --deletion-protection on the new instance once verified.308 - Plan cleanup: delete the restored instance after migration cutover.309```310311### Worked example — pre-check failure312313The pre-check-failure (BLOCKED) worked example moved verbatim to314[references/worked-examples.md](references/worked-examples.md).315316### Worked example — Aurora backtrack317318The Aurora backtrack worked example moved verbatim to319[references/worked-examples.md](references/worked-examples.md).320321## Anti-Patterns — NEVER322323- NEVER execute `restore-db-instance-to-point-in-time` or324 `restore-db-instance-from-db-snapshot` without explicitly surfacing that325 a NEW instance and NEW endpoint will be created. Operators who expect an326 in-place rewind will miss the connection-string update step and break327 their application.328329- NEVER attempt PITR on an instance with `BackupRetentionPeriod: 0`. There330 are no transaction logs and no recoverable window. Always check retention331 first and BLOCK with the modify-db-instance remediation if PITR is the332 goal.333334- NEVER assume Aurora PostgreSQL supports Backtrack. Only Aurora MySQL335 supports Backtrack. For Aurora PostgreSQL, use PITR or fast clone.336337- NEVER execute `restore-db-instance-to-point-in-time` with338 `--restore-time` outside the retention window. Always verify339 `LatestRestorableTime` and `EarliestRestorableTime` via340 `describe-db-instances` first; the API returns341 `InvalidParameterValue` if outside the window.342343- NEVER skip the target-resource pre-checks (subnet group, security group,344 option group, parameter group, KMS key). A restore with a missing subnet345 group fails after the snapshot download — wasting 30+ minutes. Always346 verify all target resources exist before executing.347348- NEVER share an encrypted snapshot cross-account without verifying the KMS349 key policy grants the recipient `kms:Decrypt` and `kms:CreateGrant`. The350 snapshot share alone is insufficient — the recipient can describe the351 snapshot but cannot restore from it.352353- NEVER copy a snapshot cross-region without surfacing the cost. Cross-region354 copy bills $0.02/GB data transfer plus destination-region storage. A 1 TB355 snapshot copied to 3 DR regions is $60 in transfer + 3 TB-month of356 destination storage.357358- NEVER delete the original instance after a PITR or snapshot restore until359 the new instance is verified AND application traffic is cut over. Restore360 is non-destructive by design; deleting the original prematurely is the361 most common cause of prolonged downtime during recovery.362363- NEVER recommend setting `BackupRetentionPeriod: 0` to "save backup costs."364 This disables PITR entirely and is irreversible for the unbacked-up365 period. The cost saving is negligible; the recovery exposure is total.366367- NEVER restore into the same DB subnet group with insufficient AZs. RDS368 recommends subnets in >= 2 AZs for Multi-AZ; restoring into a single-AZ369 subnet group blocks Multi-AZ and reduces availability.370371- NEVER skip the post-restore verification. A restore that returns372 `available` may still have data inconsistency (partial transaction log373 replay, parameter group mismatch). Always verify with a row count,374 checksum, or sentinel query.375376- NEVER execute `backtrack-db-cluster` on a writer in an Aurora Global377 Database without special handling. Backtracking the writer can desync378 the global cluster — surface as a finding and recommend detaching from379 the global cluster first.380381- NEVER assume Aurora Fast Clone is free. The clone shares storage at382 creation (instant), but divergent writes accrue new storage — a long-383 lived clone can double the storage bill. Always plan clone cleanup.384385- NEVER auto-execute a state-changing RDS CLI without the CONFIRM gate.386 Restore, snapshot create, backtrack, and export all have side effects387 (new instance bill, in-place rewind, export task charges). Always emit388 CONFIRM and wait.389390- NEVER trust `describe-db-instances` `DBInstanceStatus: available` alone391 for PITR readiness. An instance can be `available` with retention=0392 (no automated backups). Always check `BackupRetentionPeriod` and393 `LatestRestorableTime` independently.394395## Pre-flight safety checks (run before any remediation CLI)396397The full pre-flight safety check catalog (confirm gate, pre-state capture,398target/retention/KMS verification) moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md).399400## Recent AWS features (2024-2026)401402Recent AWS feature notes (2024-2026) moved verbatim to403[references/advanced-patterns.md](references/advanced-patterns.md).404405## References (load on demand)406407- [references/worked-examples.md](references/worked-examples.md) — the BLOCKED pre-check-failure and Aurora backtrack worked examples (moved from this file; the PITR worked example stays in this file)408- [references/diagnostic-commands.md](references/diagnostic-commands.md) — live-account pre-flight commands 1-8, pre-flight safety check catalog with confirm-gate and rollback capture (moved from this file)409- [references/advanced-patterns.md](references/advanced-patterns.md) — Step 0 expert-knowledge catalog of non-obvious RDS/Aurora behaviors, recent AWS features 2024-2026 (moved from this file)410- [references/restore-procedures.md](references/restore-procedures.md) — per-operation CLI procedures: PITR, snapshot restore, Aurora backtrack, fast clone, cross-region copy411412## Domain413414AWS CloudOps / RDS & Aurora Backup, Restore & Disaster Recovery.415416## AWS documentation417418- **Amazon RDS User Guide** — https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html419- **Amazon Aurora User Guide** — https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html420- **Backing up and restoring** — https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.BackupRestore.html421- **Aurora Backtrack** — https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html422- **Point-in-time recovery** — https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIT.html423- **Amazon RDS Security** — https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.html424- **AWS CLI Command Reference: rds** — https://docs.aws.amazon.com/cli/latest/reference/rds/425- **RDS Blue/Green Deployments** — https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html426- **Aurora Fast Database Clone** — https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.FastClone.html