CLI commands
Every subcommand of restorable and
restorable-verify. Synopsis, flags, env vars, and
behaviour. For the how-and-why of each command, cross-links
point at the relevant narrative page.
restorable
Customer-installed agent. One binary, multiple subcommands. Invocation:
restorable <subcommand> [flags]
Bare restorable (no subcommand) prints a
one-screen status: resolved install root, mode, agent ID, service
state, last receipt. Tailscale-style.
Global flags (available on every subcommand):
-
--root DIR(envRESTORABLE_HOME): install directory holdingconfig.yaml+keys/+blobs/+receipts/+events/. Resolution order:--root>RESTORABLE_HOME> walk-up of cwd looking forconfig.yaml>$XDG_STATE_HOME/restorable(or$HOME/.local/state/restorable) >/var/lib/restorable.doctorprints the resolved root and which branch chose it. -
--no-colororNO_COLOR=1: disable ANSI colour output. -
--version: print version and exit. -
--help: print usage and exit. Works at every level (restorable --helpandrestorable <sub> --help).
init
Customer's one-command bootstrap. Idempotent on re-run. Mode
selected by flag or existing config: --standalone
skips the orchestrator entirely; --auth-key=…
attaches via the unattended bootstrap; bare init
prints an attach URL the operator approves from the dashboard.
See Auth key setup.
-
--standalone: write a standalone-modeconfig.yaml; no orchestrator contact. -
--auth-key rsk_auth_…(envRESTORABLE_AUTH_KEY): unattended attach. Single-use keys auto-revoke on first delivery. -
--auth-key-file PATH: read the auth-key from file (mode 0600). -
--orchestrator URL(envRESTORABLE_ORCHESTRATOR_URL, defaulthttps://app.restorable.app). -
--name NAME: override the hostname-derived agent name surfaced in the dashboard. -
--force-reattach: rotate the bearer token on an already-attached agent. Refused by default to prevent an accidental paste from abandoning past-receipt lineage. -
--skip-doctor: skip the post-attach preflight.
status
Print the agent's current state: resolved root + provenance,
mode, agent id, service health, last receipt. Bare
restorable routes here.
serve
Long-lived heartbeat loop. Reads config.yaml, talks
to the orchestrator on a heartbeat cadence, runs
run_backup and run_restore_test
commands the orchestrator returns. This is what the systemd
unit invokes.
backup
One-shot backup of a declared source. Used by standalone mode
(cron triggers this) and for manual debugging. Managed mode
runs it indirectly via the run_backup command.
-
--source SLUG(envRESTORABLE_SOURCE): which source to back up. Optional when only one source is declared (ordefaults.sourceis set inconfig.yaml); errors with the available list when multiple sources need disambiguation.
restore-test
One-shot restore test of a source's latest backup. Decrypts,
spins up the scratch, runs every check, signs the receipt,
writes the DSSE envelope into <root>/receipts/.
--source SLUG: same precedence asbackup.-
--check ID(repeatable): override the source's configured check list; default fires every linked check.
download
Fetch a backup's dump for disaster restore. Default mode
streams the ciphertext, verifies its SHA-256 against
registered metadata, decrypts with the agent's age key, and
writes the engine-native dump (<backup_id>.pgdump
for Postgres, <backup_id>.mongoarchive for
MongoDB) into the directory you supply. Apply the dump with
your engine's own restore tool.
Restorable does not write to your databases. There is no
--to <target>: pg_restore,
mongorestore, and your runbook's flags are
yours.
-
--backup BKP_ID: specific backup to fetch. Mutually exclusive with--latest. -
--latest --source SLUG: fetch the most recent backup for the source. -
--out DIR: existing directory to write into. The agent picks the filename (<backup_id>.<ext>); refuses to clobber. -
--ciphertext: skip decryption; write the raw encrypted blob. No keys are loaded in this mode. Suitable for compliance archives or hosts with no agent identity.
digest
Renders a human-readable weekly summary from receipts in
<root>/receipts/. Terminal-friendly; useful
for local sanity checks and (in standalone mode) for piping to
mail.
-
--since DURATION(default7d): how far back to look.
doctor
Validate host prerequisites and per-source connectivity. Prints the resolved root + provenance + chosen source so a "wrong config" run is debuggable in one shot.
--source SLUGor--all-sources: run per-source probes (DSN resolve, connect, role privileges, dry-run each check). Mutually exclusive.--orchestrator URL: override the URL used for the orchestrator-reachability probe; defaults to the value inconfig.yaml.--skip-pull: don't pull missing toolchain images; only report on their presence.--min-disk-mb N(default1024): fail the disk probe below this floor.
source add
Interactive wizard (or flag-driven) for adding a source + auditor-framed checks. See Add a Postgres source.
restorable-verify
Standalone receipt verifier. Offline by default; one optional flag fetches transparency-log proofs.
restorable-verify [flags] FILE [FILE ...] -
--pubkey PATH(required): path to the agent's public signing key. Accepts an inline base64 value if prefixed with@:--pubkey @ed25519:AAAA.... -
--format FORMAT(defaulttext):textfor the human-readable output,jsonfor structured output. -
--follow-chain: verifyprev_receipt_idchains across the batch. Report gaps.
Exit codes:
0: every input verified.1: a verification failed; first failure message on stderr, full output continues on stdout.2: CLI usage error (missing flag, file not found).
Environment variables
Agent:
RESTORABLE_HOME: install root (env-twin of--root).RESTORABLE_SOURCE: default source slug (env-twin of--source; loses to a passed flag, wins overdefaults.sourceinconfig.yaml).RESTORABLE_AUTH_KEY: bootstrap auth-key (env-twin of--auth-keyoninit).RESTORABLE_ORCHESTRATOR_URL: orchestrator base URL (env-twin of--orchestrator).RESTORABLE_DB_URIor other names the operator chooses: consumed byenv:secret references inconfig.yaml.NO_COLOR: disable ANSI output.
Installer:
RESTORABLE_VERSION: pin a version for install; default is whatever install.sh ships.RESTORABLE_BASE_URL: override where to fetch binaries from (mirror).RESTORABLE_SKIP_PREREQS=1: skip Docker and minisign install.RESTORABLE_SKIP_VERIFY=1: skip minisign signature verification (tests only, do not use in production).- See Manual install for the full list of installer env vars including the sandbox-prefix overrides.