AgentKit
Tài liệuBộ kitTham chiếu CLIỨng dụng Desktop
BetaBạn đang đọc tài liệu kênh beta (3.0.0-beta.15). Tính năng có thể thay đổi trước bản stable tiếp theo.Chuyển sang stable →

recovery

ak secrets recovery accept-rollback

Chấp nhận một vault cũ hơn bản gần nhất mà máy này từng thấy.

Chấp nhận một vault cũ hơn bản gần nhất mà máy này từng thấy.

Dùng ak secrets recovery accept-rollback với đối số và tùy chọn dưới đây. Phần help nguyên bản giữ nguyên thuật ngữ, cú pháp, tác động và điều kiện thực thi của CLI để đối chiếu chính xác.

Contract và help của lệnh

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