Disaster Recovery¶
| Owner | Patrick Tolvstein |
| Version | 1.0 |
| Created | 2025-08-24 |
| Last reviewed | 2026-06-16 |
| Next review | 2027-06-16 |
Use this when there is data loss, server failure, or a catastrophic outage that cannot be resolved by standard troubleshooting or the contingency plan. The goal is to restore the system to a known-good state as quickly and safely as possible.
Recovery objectives¶
| Metric | Target |
|---|---|
| RTO (Recovery Time Objective) | < 4 hours for P1 outages |
| RPO (Recovery Point Objective) | < 24 hours (last successful backup) |
Backup inventory¶
| Asset | Backup method | Frequency | Location | Retention |
|---|---|---|---|---|
| Database (MariaDB) | Automated dump | Daily | SQLBak or Storage Box | 30 days |
| WordPress uploads | File sync | Daily | SQLBak or Storage Box | 30 days |
| Server configuration | Ansible (IaC) | On change | GitHub | Indefinite |
| DNS records | Cloudflare export | On change | Cloudflare | - |
Info
Ansible playbooks in subscribed-aps/tools-server-configuration are the source of truth for server state. A server can be fully reprovisioned from scratch using them.
Recovery scenarios¶
Scenario 1 - Database corruption or loss¶
- Stop the application to prevent further writes
- Identify the last clean backup
- Restore the database: Or use SQLBak for restoring the database directly from their interface.
- Verify data integrity (spot-check recent orders, users - check for IDs, dates etc.)
- Restart the application and monitor
Scenario 2 - Server failure (unrecoverable)¶
- Provision a new server using Ansible:
- Restore database from latest backup (Not relevant if the failure is only related to edge servers)
- Restore WordPress uploads (Not relevant if the failure is only on alpha servers)
- Update DNS to point to new server IP (Cloudflare)
- Verify SSL certificates are active
- Run smoke tests (place test order, check all pages)
Scenario 3 - Ransomware / total compromise¶
- Isolate all affected systems immediately (see Incident Response)
- Do not pay the ransom before consulting legal and cyber insurance
- Provision clean servers from scratch using Ansible
- Restore only from backups predating the compromise
- Reset all credentials (database passwords, API keys, SSH keys, admin accounts)
- Rotate all secrets and tokens before going live
- Report to Data Protection Authority if personal data was affected (72-hour GDPR deadline)
Post-recovery checklist¶
- All sites loading correctly
- Checkout and payment flow tested end-to-end
- Transactional emails sending
- Admin access confirmed for all team members
- No data loss beyond the RPO window
- Incident log updated
- Post-mortem scheduled within 5 business days