Skip to content

State store and resume

Every automax run creates or reuses a run-id. The run-id identifies one execution attempt and is stored in a local SQLite state store by default:

.automax/runs/<run-id>/state.sqlite

A different directory can be selected with --state-dir:

automax run \
  --job /srv/automax/jobs/deploy.yaml \
  --inventory /srv/automax/inventory/prod.yaml \
  --state-dir /var/lib/automax/runs

The state store records:

job/inventory/vars/secrets paths
run status
node checkpoints
target status
plugin result data
events
registered outputs

Listing runs

automax runs list --state-dir /var/lib/automax/runs

Inspecting one run

automax runs show <run-id> --state-dir /var/lib/automax/runs

The command prints run metadata, aggregate node counts, per-target status, warning nodes, failed checkpoints and ready-to-copy resume commands. Narrow the node table when needed:

automax runs show <run-id> --state-dir /var/lib/automax/runs --failed
automax runs show <run-id> --state-dir /var/lib/automax/runs --server web01
automax runs show <run-id> --state-dir /var/lib/automax/runs --json

A failed run also prints the same resume hints at the end of automax run, so an operator can retry without opening the SQLite state manually.

Exporting run evidence

Use runs export when a completed or failed run must be attached to a change record, incident note or handover. The export includes run metadata, summary counts, target status, node status, artifact metadata and resume commands. Node result keys are listed without dumping full plugin result payloads.

automax runs export <run-id> --state-dir /var/lib/automax/runs --output evidence.md
automax runs export <run-id> --state-dir /var/lib/automax/runs --format json --output evidence.json

Use runs bundle to create a portable ZIP with Markdown evidence, JSON evidence, an artifact manifest and captured artifact files:

automax runs bundle <run-id> --state-dir /var/lib/automax/runs --output automax-evidence.zip

Resume from first failed node

automax resume <run-id> --state-dir /var/lib/automax/runs

Resume from an explicit node

automax resume <run-id> \
  --state-dir /var/lib/automax/runs \
  --from task.install:step.packages:substep.install_nginx

Task-level and step-level checkpoints are accepted:

task.install
task.install:step.packages
task.install:step.packages:substep.install_nginx

resume uses the original job, inventory, vars and secrets paths saved in the state store. CLI variable overrides can still be supplied with --var.