| title | pg hardstorage integrity | ||
|---|---|---|---|
| description | CLI reference for the pg hardstorage integrity command. | ||
| tags |
|
Continuous-attestation runs: re-verify manifests + chunks, sign the report
Run periodic integrity scans of the repository. Each run re-verifies every committed manifest's signature, confirms its referenced chunks are still present, and (optionally) re-fetches a sample of chunks for plaintext SHA-256 verification. The result is signed with the operator's key and stored in the repo under integrity/runs/.json so an auditor can prove the repo was intact at any historical attest time.
Strategies (cost vs assurance):
manifests-only fastest; just re-verify ed25519 signatures presence (default) manifests + Stat every referenced chunk content-sample N manifests + Stat all + plaintext-SHA-256 N% sample content-full manifests + Stat all + plaintext-SHA-256 every chunk
Exit codes:
0 no issues 9 found_issues (signature break, missing or mismatched chunks) — exit code matches the "verify-failed" namespace; cron will alert. 6 notfound (run id or strategy target absent)
pg_hardstorage integrity [flags]
-h, --help help for integrity
--airgapped airgapped: strict refuse outbound endpoints (LLM providers, sinks, OTLP collectors) outside loopback / RFC1918 / explicit airgap.allowlist. Also enabled by PG_HARDSTORAGE_AIRGAPPED=1 or airgapped: strict in the config file.
-c, --config string path to config file (default: XDG/FHS lookup)
--cpu-profile go tool pprof <path> write a pprof CPU profile to this path for the duration of the command (go tool pprof <path> to analyse). Off when empty.
--mem-profile string write a pprof heap profile to this path at command exit. Off when empty.
--no-color disable ANSI color in text output
--on-error-llm on a structured-error failure, drop into the matching LLM helper skill (auto_on_error trigger). Also enabled by PG_HARDSTORAGE_ON_ERROR_LLM=1.
--otel-endpoint string OpenTelemetry OTLP/HTTP endpoint (e.g. http://otel-collector:4318); empty disables tracing
--otel-stdout also export OpenTelemetry traces to stderr (useful for dev)
-o, --output string output format: text|json|ndjson|yaml|template|csv|markdown|html|tap|junit|pdf (default: text on TTY, json off-TTY)
--profile-port go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30 if non-zero, expose net/http/pprof on 127.0.0.1:<port> for live profiling of long-running commands (e.g. go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30). Off when zero.
-q, --quiet suppress non-essential output
--template string Go text/template applied when --output template (or implied if --template is set without --output)
- pg_hardstorage - PostgreSQL backup, done right.
- pg_hardstorage integrity list - List integrity runs newest-first
- pg_hardstorage integrity run - Execute one continuous-attestation run; sign + persist; exit 9 on issues
- pg_hardstorage integrity show - Show one integrity run's full body + per-failure detail
- pg_hardstorage integrity verify - Re-validate the signature on a previously-stored run