Pcornel
Automation

Rollback & Recovery

Cheat sheet · https://pcornel.dk/topic.php?topic=5947

Back to the Topic

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

LayerRollback & Recovery operational reference
Runtime/ownershipAutomation rollback/recovery patterns / Ansible current · identify controller/worker/target ownership before mutation
Persistent intentVersioned configuration/playbook/workflow with explicit dependencies and least-privilege identity
Verificationansible-playbook recovery.yml --check --diff; ansible-playbook recovery.yml -vv
Expected interpretationPre-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 boundaryPreserve 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

Confirmation

Confirm action

Continue?