Use this when long jobs should resume rather than restart.
Checkpoints · Automation Design
Checkpoints record progress at safe points in a long automation job, so a failure later does not mean starting over and the job can resume from the last completed step.
1. Checkpoints record progress so long runs can resume.
2. Persist state after each major step.
3. Make steps idempotent.
4. Clean up when done.
5. Useful for migrations.
step done → checkpoint saved → continue
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verify checkpoint semantics with restart, ownership and state read-back Verify boundary
Verify Checkpoints in a bounded workflow by recording the checkpoint ID after a known completed side effect and then restarting the worker or controller. Expect the workflow to reacquire the checkpoint once, skip already committed work and continue from the documented next step. Confirm target state before and after resume and verify no duplicate side effect occurred. A checkpoint record shows stored orchestration progress, but it does not show the represented target action completed unless read-back confirms it.
Step 2 Verify checkpoint safety with restart, drift and duplicate-worker tests Verify boundary
Verification should show both resume correctness and non-duplication. Start a bounded workflow with a unique run ID and allow it to complete one observable side effect. Confirm the checkpoint records the expected workflow version, input fingerprint, target identity and next action. Stop the worker or controller after the checkpoint is durable, then restart it. The resumed execution should reacquire ownership once, validate the checkpoint, independently read back the represented target state, skip already committed work and continue from the documented next action. Compare external operation IDs or target history to confirm the completed side effect occurred once rather than twice.
Then exercise the unsafe paths. Change an input fingerprint, target scope or workflow version and confirm resume fails closed or enters the documented migration/re-plan path. Create target drift after checkpoint creation and confirm the workflow detects the mismatch before continuing. If multiple workers are possible, attempt concurrent resume and confirm the lease/lock prevents two active owners. These tests show the checkpoint/resume contract for the bounded scenario, not universal idempotency of every action in the workflow.
The final limit of what it shows is the target, not the checkpoint row. A valid checkpoint shows stored orchestration state. It does not show the side effect really committed, the target still matches that state, or the remaining workflow is safe under current conditions. That distinction is why Checkpoints links directly to Resume rather than standing alone as a recovery guarantee.
Step 3 Checkpoint failure signatures and safe recovery branches Narrow the fault
Checkpoint failures usually fall into a small set of branches. Record missing or unreadable means persistence/retention/permissions failed and should be distinguished from a workflow that never reached a checkpoint. Version or input mismatch means the stored state may no longer describe the current workflow and should not be force-loaded. Target read-back disagrees with checkpoint indicates drift, partial completion or an ambiguous crash window. Two workers claim the same checkpoint indicates missing or ineffective ownership/lease semantics. Repeated side effect after resume points to a checkpoint timing or idempotency defect, while skipped required side effect can indicate the checkpoint advanced before the target commit was confirmed.
Troubleshoot using one checkpoint ID and one target. Read the record without modifying it, compare schema/workflow version and fingerprints, inspect ownership/lease state, then query the external operation or target object represented by the last committed boundary. If state is ambiguous, preserve the checkpoint and target evidence before retrying; recreating the checkpoint can erase the information needed to distinguish “effect committed, checkpoint lost” from “effect never committed.” Decide explicitly between resume, compensate, re-plan, roll back or abandon.
For a personal automation environment, the safest design may intentionally stop more often than an enterprise orchestrator would. A clear owner-visible stale-checkpoint condition is low operational cost and prevents silent duplication. The goal is deterministic recovery, not maximum unattended continuation.
Step 4 Branch checkpoint failures at persistence, compatibility, target drift and resume ownership Narrow the fault
If Checkpoints cannot resume an automation workflow, verify the checkpoint record exists and is readable before recreating it. If it loads but is rejected, compare workflow version, input hash and target scope. If it is accepted but the next step conflicts with current target state, inspect drift since the checkpoint and decide whether to re-plan or roll back. If duplicate workers resume the same checkpoint, inspect lease or lock ownership. Never advance the checkpoint until the side effect it represents is independently observable.
Step 5 Common mistakes Narrow the fault
- Checkpoints that do not record enough state to resume.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Record progress at safe points.
- Steps after a checkpoint must be idempotent.
- Store checkpoints durably.
- Checkpoint records (step completed) — progress
- State persisted between steps — resumability
- Checkpoint cleanup — hygiene
ReferenceWhy it matters1 section · depth on demand
Automation checkpoints persist resumable progress at explicit transaction boundaries
Checkpoints let a long automation workflow resume without repeating completed work, but only when the checkpoint captures enough identity and state to show what was committed. A step index alone is unsafe when inputs, target inventory or desired revision can change between attempts. A useful checkpoint binds workflow version, input hash, target scope, completed side effects and pending next step. The target system remains authoritative for effective state, so resume logic must revalidate critical assumptions before continuing.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
In automation design, checkpoints are saved points in a long-running job — configuration backups, snapshots, or a record of completed steps — that allow resuming or rolling back without starting over.
| Checkpoint type | Use |
|---|---|
| Config backup before change | Restore device configuration |
| VM/storage snapshot | Roll back a server change quickly |
| Progress marker | Resume a batch after failure at item 412 |
| Commit-confirmed | Device reverts automatically unless confirmed |
configure replace flash:pre-change.cfg list ! IOS XE rollback
commit confirmed 5 ! IOS XR / Junos
Documented example, not captured output.
Record where each checkpoint is stored in the job log so whoever responds to a failure can find it.
Checkpoint identity, durability and transaction semantics
Automation Checkpoints persist enough information to resume a workflow without repeating side effects that have already been committed. The important boundary is not “step 7 completed”; it is a durable statement tying workflow version, input fingerprint, resolved target scope, completed side effects and the next permitted action to one checkpoint identity. A numeric step index alone becomes unsafe when code, inventory, desired state or target reality can change between attempts. A checkpoint should therefore be treated as a resumable transaction boundary rather than a progress-bar value.
Separate orchestration state from target state. The checkpoint store records what the workflow believes was completed, while the managed system remains authoritative for whether a side effect is actually present. Before continuing, resume logic should revalidate the assumptions that make skipping previous work safe: checkpoint compatibility, target identity, desired revision, lock/lease ownership and critical target read-back. If those checks fail, the safe action may be re-plan, compensate, roll back or require owner review rather than blindly moving to the next step.
Durability also has a failure model. A checkpoint written before a side effect commits can cause the side effect to be skipped after restart; a checkpoint written after a side effect without idempotency can leave a crash window where the effect committed but the checkpoint did not. Designs reduce that ambiguity with idempotent operations, transaction/commit markers, external operation IDs, or reconciliation on resume. For Pcornel.dk the reference should emphasize these boundaries, not prescribe heavyweight workflow engines when a small state file or database row is sufficient.
ReferenceConfiguration & state1 section · depth on demand
Known-good checkpoint record and resume policy
A small known-good checkpoint record should contain a stable checkpoint/workflow ID, workflow/schema version, input or desired-state fingerprint, resolved target identities, last committed boundary, next action, completed external operation IDs where relevant, creation/update time and ownership/lease information if concurrent workers are possible. Persist only the state required to resume safely; avoid embedding secrets or large transient payloads that belong in their authoritative systems. Version the checkpoint format so a newer workflow can reject or migrate incompatible state deliberately instead of misreading it.
Write checkpoints at explicit commit boundaries. For a read-only discovery phase, a checkpoint can usually be written after the discovery result is durably stored. For a mutating step, prefer an idempotent target operation or a target transaction ID that can be queried after restart. On resume, compare workflow version, input fingerprint and target scope first, then read back the critical target state represented by the checkpoint. Only after those checks agree should the workflow skip prior actions and continue. If a single-owner workflow cannot safely automate that decision, stopping with a clear “checkpoint stale / review required” result is better than speculative continuation.
A bounded known-good test is: perform one reversible side effect, write the checkpoint, stop the worker, restart it, confirm the previous side effect is not duplicated, and confirm exactly one owner resumes from the documented next action. This pattern is authored guidance; it does not claim a particular production checkpoint store has been tested or verified.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation Design > Checkpoints. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/enable-automation · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Quick lookup tables
Checkpoints operational decision reference
Known-good boundaries, failure signatures and the next check for this Topic.
| Checkpoint field/boundary | Known-good | Broken or risky | Resume action |
|---|---|---|---|
| Workflow version | Exact compatible version | Unknown/incompatible version | Fail closed or migrate explicitly |
| Input fingerprint | Matches current desired input | Desired input changed | Re-plan before continuing |
| Target scope | Same stable identities | Targets added/removed/reused | Resolve scope again |
| Last committed effect | Target read-back confirms effect | Checkpoint and target disagree | Investigate crash/drift boundary |
| Ownership | One valid lease/worker | Multiple active owners | Stop duplicate resume |
| Next action | Explicit and idempotent/bounded | Ambiguous continuation | Require owner review |