AgentKit
DocsKitsCLI ReferenceDesktop App

recovery

ak secrets recovery accept-rollback

Accept a vault that is older than the last one this host saw

Use ak secrets recovery accept-rollback for the operation described below. The command help records its arguments, effects, and options.

Command contract

Accept a vault that is older than the last one this host saw

Synopsis

Every write to the vault bumps a counter, and this host records the highest one it has seen. A vault whose counter is lower than that record has gone backwards — restored from an old backup, synced over by a stale copy, or swapped in by someone else — so the file backend refuses to open it. Run this only once you know why the vault is older and have decided to keep it: the writes recorded after it are gone.

Effects: Rewrites the vault's high-water mark file to the counter the vault currently carries, which lets the file backend open it again. The vault itself is not changed. The mark is an ordinary file beside the vault: it notices a vault that has gone backwards, it does not stop anyone who can already write both.

Exit status: 0 success 2 no interactive terminal and no --seq <n> --yes, or the vault is at a different sequence 3 no vault at that path 5 the vault could not be opened, or the mark could not be written

ak secrets recovery accept-rollback [flags]

Examples

  ak secrets recovery accept-rollback
  ak secrets recovery accept-rollback --seq 41 --yes   # scripted; fails if the vault is not at 41

Options

  -h, --help             help for accept-rollback
      --json             Emit machine-readable JSON (implies --no-interactive)
      --no-interactive   Disable interactive prompts (CI-safe)
  -q, --quiet            Suppress non-error output on stderr
      --seq int          The sequence the vault must currently carry; required to accept a rollback without a terminal
  -V, --verbose          Extra diagnostic output on stderr (loses to --quiet)
  -y, --yes              Assume yes for all prompts

SEE ALSO