Automation
Rollback & Recovery
Cheat sheet · https://pcornel.dk/topic.php?topic=5947
Answer
Rollback and recovery in automation returns systems to a known good state after a failed change, through reverse steps, restored backups or snapshots, or redeploying the previous version.
Remember
- Plan rollback before the change.
- Back up configuration and state first.
- Verify after rollback, not just run it.
First checks
- Rollback strategy per automation — plan
- Backups/snapshots before change — restore points
- Recovery verification — proof
Verify in this order
change → failure → rollback/recover → verify
Where it usually breaks
Automation/controller success is not target-state proof; target config/state is not effective-runtime proof; effective state is not workload proof.
→ Rollback & Recovery · operational reference
| Layer | Rollback & Recovery operational reference |
|---|---|
| Runtime/ownership | Automation rollback/recovery patterns / Ansible current · identify controller/worker/target ownership before mutation |
| Persistent intent | Versioned configuration/playbook/workflow with explicit dependencies and least-privilege identity |
| Verification | ansible-playbook recovery.yml --check --diff; ansible-playbook recovery.yml -vv |
| Expected interpretation | Pre-change evidence and recovery points exist, partial completion is identified, rollback/forward-fix changes only demonstrated state, and final service state is independently verified. |
| Recovery boundary | Preserve correlation IDs + pre-state, then verify target/service independently after remediation |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5947