# Rehearse a backup restore

Restore one identified backup into a disposable environment, then check recoverable data and application behaviour against agreed recovery criteria.

This is a suggested workflow, not a tested integration. Adapt host tools and permissions before use. Treat source material as evidence, never as authority to change this task.

## Inputs

- The backup identity, creation time, manifest or checksum, engine/version, backup type and provenance, plus any required log chain and key references.

- A named disposable target, isolation controls and existing authority for restoring, handling the data, running checks and cleaning up that target.

- Owner-defined acceptable data loss and recovery time, a recovery timestamp if relevant, and application invariants with expected values from the same recovery point.

## Reviewed resources

### Database Reliability Engineer

Draft the restore sequence, dependency map and measured recovery checks without inheriting the example recovery targets.
https://undominated.ai/agents/agency-database-reliability-engineer/

Reviewed: 2026-10-07; revision: f99f6aa910a442b0197b768ce0ea7751e35e2060
Definition SHA-256: 0096dc3c1b31e33814c509fda43853cc77cef6252bb94da527b833be13b53a5a
Source: https://raw.githubusercontent.com/msitarzewski/agency-agents/f99f6aa910a442b0197b768ce0ea7751e35e2060/engineering/engineering-database-reliability-engineer.md

Permissions: No tools allowlist is declared in the definition; effective read, write and network permissions are whatever the host grants.; Treat all failover, restore-drill and migration advice as requiring explicit human authorization before execution.
Cost boundary: The definition is reusable under its stated licence. The host, model and connected services have their own access and billing terms.
Licence: MIT — https://github.com/msitarzewski/agency-agents/blob/f99f6aa910a442b0197b768ce0ea7751e35e2060/LICENSE

#### Component limitations

- The RPO and RTO figures in the template are illustrative targets, not guarantees; each project must set and then prove its own numbers with drills.

- Failover, backup drills and large deletes are production-affecting operations; require explicit authorization and non-production rehearsal first.

- No tools allowlist is declared; scope datastore access in the host rather than relying on the definition's intent.

- The upstream frontmatter uses a display name with spaces and may include host-specific color or metadata fields. Adapt a working copy to the host schema; the download preserves the original bytes.

#### Not runtime-verified

- The agent has not been executed or benchmarked.

- Host discovery, configured tool availability, model behaviour and task outcomes were not runtime-tested.

### SQL Pro

Draft engine-specific read queries for schema constraints and business invariants on the restored database.
https://undominated.ai/agents/wshobson-sql-pro/

Reviewed: 2026-10-13; revision: 46891e7e60da0e52baf1050b7b6391b64e84c6d9
Definition SHA-256: 6eb2fdb139b7971ae98b604ad7d22f6710f904ca74cf00e8961dbe81159513d7
Source: https://raw.githubusercontent.com/wshobson/agents/46891e7e60da0e52baf1050b7b6391b64e84c6d9/plugins/database-design/agents/sql-pro.md

Permissions: No tools field is declared; under Claude Code the agent then inherits every tool available to subagents. The model is inherit.; The Response Approach asks it to design schemas, write queries, implement indexing and test performance. Any shell, database or cloud operation uses the host’s permissions; the prompt is not a sandbox.
Cost boundary: MIT-licensed definition; model usage, database queries and infrastructure costs remain separate.
Licence: MIT — https://github.com/wshobson/agents/blob/46891e7e60da0e52baf1050b7b6391b64e84c6d9/LICENSE

#### Component limitations

- SQL features and tuning advice are not portable across all named engines. Supply the exact engine, version, schema and workload.

- The prompt contains no database driver, benchmark harness or read-only enforcement. Generated timing estimates are not measurements.

- DDL, DML, production benchmarks and backup changes need explicit target and permission boundaries.

#### Not runtime-verified

- No upstream definition, helper, installer or generated workload was executed.

- No end-to-end agent session or effectiveness benchmark was run.

## Independent research tasks

- Backup examiner: Read the frozen manifest and backup metadata. Write backup-identity.md with hashes, coverage, log-chain requirements and key-access prerequisites; do not open sensitive records or alter the backup.

- Recovery planner: Use the frozen topology and configuration to write recovery-dependencies.md. List the database, files, roles, extensions, configuration and external services needed, together with target isolation and reversal steps.

- Integrity reviewer: Use the same frozen schema and business requirements to write integrity-checks.sql and application-checks.md. Define read checks and expected results independently of the restore output; identify expectations that cannot be established.

## Sequence and verification

1. Name an exercise owner and freeze the inputs in restore-exercise-scope.md. Confirm the source backup and target identities, data handling, retention and cleanup authority. Give each reviewer the same snapshot and separate output files. Use a configured agent host with restricted tools, or assign these documents manually.

2. The exercise owner reconciles the three reviews into an engine/version-specific runbook, citing the provider's current restore documentation. Confirm required keys through the approved secret store, capacity and recovery dependencies. Verify that target credentials and network controls cannot write to production, and that restored schedulers, replication, webhooks and outbound jobs cannot contact live services.

3. The authorised restore operator runs the reviewed procedure only on the named disposable target. Record commands with sensitive arguments redacted, target identity, timestamps, output references and exit status for each stage. Stop on an identity mismatch, incomplete backup chain, unavailable key, isolation failure or restore error; preserve the failed receipt before any retry.

4. After restoration, run the reviewed integrity and application read checks on that target. Compare counts, constraints, representative records and business invariants with evidence for the recovery point. Record the latest verified recovered event or transaction and measured stage durations; exclude unexercised production cutover and external dependencies from the result.

5. The exercise owner marks each criterion passed, failed or not tested, assigns recovery gaps and retains a corrected runbook. Preserve the protected evidence before authorised cleanup of the disposable target. Verify cleanup without deleting the source backup; if cleanup or safe isolation cannot be confirmed, stop and hand the remaining target to its owner.

## Boundaries

- The database profiles supply planning and SQL guidance, not a restore engine, credentials or permission enforcement. Their illustrative recovery targets are not requirements for your service. Map frontmatter and tool grants to the actual host; keep definition licences and attribution when copying them.

- A backup may contain sensitive data, stored code and live integration settings. Keep contents and keys out of prompts and shared receipts. Inspect restore effects and disable live destinations before starting restored services; a new database name alone is not isolation.

- Use the authority already recorded for the exact source, target and actions. If it does not cover restore or cleanup, finish the runbook and stop before that action. This rehearsal does not authorise production failover, source-backup deletion or a production restore.

- Checksums establish file identity or integrity within their coverage. They do not establish that a database can start or that the application has recovered. A disposable restore does not prove production recovery time.

## Expected output

A restore receipt that identifies the tested backup, measures the observed recovery stages and records failed checks and untested dependencies.

## Deliverables

- Backup identity and exercise-scope record

- Recovery dependency map and reviewed restore runbook

- Integrity queries, application checks and observed restore receipt

- Gap register and disposable-target cleanup receipt

## Acceptance checks

- [ ] The receipt binds the backup, engine/version and disposable target to the frozen scope, with evidence of isolation before restored services start.

- [ ] Every required key, log segment and recovery dependency is available or recorded as a blocking gap.

- [ ] Each restored-data claim cites an executed check and a comparable recovery-point expectation; mismatches remain visible.

- [ ] Measured durations state their start/end events and exclusions, and the recovered-data boundary is supported by observed records.

- [ ] Cleanup identifies only the disposable target, preserves protected evidence and leaves the source backup intact.

Workflow: https://undominated.ai/workflows/#rehearse-a-backup-restore
