<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# Disaster Recovery Architecture — API Reference

## agent.js CLI

```bash
# Classify systems by DR tier
node scripts/agent.js --action classify --systems systems.json

# Design DR architecture
node scripts/agent.js --action design --systems systems.json --output dr-arch.json

# Validate backup security
node scripts/agent.js --action validate-backups --backups backup-config.json

# Generate DR test plan
node scripts/agent.js --action test-plan --architecture dr-arch.json --output test-plan.json
```

## System JSON Schema

```json
{
  "name": "payment-api",
  "criticality": "high",
  "rto_minutes": 15,
  "rpo_minutes": 0
}
```

## DR Tiers

| Tier | RTO | RPO | Strategy |
|------|-----|-----|----------|
| 1 | < 15 min | 0 | Active-active multi-region |
| 2 | < 1 hour | < 15 min | Hot standby |
| 3 | < 4 hours | < 1 hour | Warm standby |
| 4 | < 24 hours | < 24 hours | Cold standby |
| 5 | > 24 hours | > 24 hours | Backup restore |

## Backup Security Requirements

- Encrypted with AES-256-GCM
- Immutable storage with retention lock
- Separate credentials from production
- Integrity verification (SHA-256 checksums)
- Air-gapped/offline copy for ransomware protection
