Skip to main content

Command-line interface

Sentinel is a single binary with eleven top-level commands. Every command accepts --help, and --help is authoritative; this reference is checked against it.

sentinel --help
sentinel <command> --help

Commands

CommandPurpose
backupRun a database backup, and inspect or verify existing ones
restoreManage backup restoration and recovery
scheduleManage automated backup and restore scheduling
monitorMonitor backup history and statistics
retentionManage backup retention policies
configManage configuration files
dbDatabase schema and migration management
securitySecurity key management
storageStorage backend management
repairReconcile internal state across monitor rows, manifests, artifacts, and locks
versionPrint Sentinel build metadata

Cobra also supplies help and completion, which behave as they do in any Cobra program.

Global flags

The root command carries only two flags:

FlagDescription
-h, --helpHelp for the command
-v, --versionVersion for sentinel

--config is not a global flag. Each command that reads a configuration file registers its own, which is why every example on this site repeats --config sentinel.yaml rather than setting it once.

caution
Three backup subcommands cannot be run today

sentinel backup chain-status, chain-list, and force-full require a configuration file but do not register a --config flag, and the one on sentinel backup is not inherited. They fail whether the flag is passed or not. See sentinel backup for detail.

{/* sources: internal/cli/root.go, internal/cli/backup.go, internal/cli/restore.go, internal/cli/schedule.go */}