CLI 参考
按任务整理的常用 opsctl 命令入口。
内容经过人工双语校对
所有命令都支持全局路径参数:
opsctl \
--registry /srv/server-registry \
--state-dir /var/lib/opsctl \
<command> --json状态与诊断
opsctl status --json
opsctl services --json
opsctl ports --json
opsctl doctor --json
opsctl scan --json
opsctl audit --jsonRegistry 与漂移
opsctl registry validate --json
opsctl registry drift list --json
opsctl registry drift explain <drift-id> --json
opsctl registry drift cleanup-request progress <request.yml> --json计划与部署
opsctl analyze <project-root> --json
opsctl plan <project-root> --json
opsctl preflight <plan.yml> --json
opsctl snapshot <plan.yml> --dry-run --json
opsctl deploy <plan.yml> --dry-run --json备份与恢复
opsctl backup doctor --json
opsctl backup readiness --json
opsctl backup history --json
opsctl backup plan <service-id> --dry-run --json
opsctl backup restore-plan <service-id> --help
opsctl backup volume-protect lab-qualify --json证据与治理
opsctl registry drift cleanup-request audit-verify --json
opsctl registry drift cleanup-request evidence-key-status --json
opsctl registry drift cleanup-request evidence-verify-all --json
opsctl backup volume-protect retention-status --json
opsctl backup volume-protect archive-drill-status --json
opsctl backup volume-protect key-dr-status --json
opsctl backup volume-protect slo --json人机界面
opsctl tui
opsctl tui --dump --json
opsctl mcp执行前再次确认
--execute 会改变状态。先运行不带 --execute 的同参数命令,检查目标、路径、限制项和审批 token,再进入维护窗口。