Runbooks¶
Step-by-step procedures for known operational tasks. Read the right runbook before you start — they exist so you do not improvise under stress.
When something is broken¶
- Check incident-response.md first — it routes you to the right runbook
- Once routed, follow the runbook to the letter
- If the runbook is wrong or incomplete, fix it after the incident
Available runbooks¶
| Runbook | Use when |
|---|---|
| restore-postgres.md | A single DB needs to roll back |
| restore-volume.md | A Docker volume is corrupted or wiped |
| restore-from-snapshot.md | The whole VPS needs to roll back |
| docs-rebuild.md | Publish documentation changes |
| shared-state-locking.md | Editing a shared .env or running a multi-step git transaction under /opt |
Writing a new runbook¶
Template every runbook against this shape:
- When to use — one sentence describing the trigger
- Cost / blast radius — what is disrupted
- Prerequisites — access, info, downtime window
- Steps — numbered, copy-pasteable shell where possible
- Verify — how do you know it worked
- Rollback — what to do if your fix made it worse
- Escalation — when to stop and call João
A runbook that you cannot follow at 03:00 is not a runbook.
Post-mortems¶
Live in post-mortems/ (created on first use). One file per incident: what happened, root cause, prevention.