| title | pg hardstorage | ||
|---|---|---|---|
| description | CLI reference for the pg hardstorage command. | ||
| tags |
|
PostgreSQL backup, done right.
pg_hardstorage is an enterprise-grade PostgreSQL backup tool.
Resilience, compliance, simplicity, and scale-spanning (10 GB to 100+ TB) are the design north stars. WAL streaming over the replication protocol is the central data plane. Apache 2.0.
Every command in v0.2 is a real implementation (no scaffolding stubs). The advanced surfaces — gRPC, OIDC + RBAC, advise+execute LLM mode, sandbox-PG runtime — extend per docs/SPEC.md.
--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.
-h, --help help for pg_hardstorage
--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 agent - Run the host agent (loads config, runs scheduled backups + retention)
- pg_hardstorage anomaly - Inspect backup metric baselines for outliers
- pg_hardstorage approval - n-of-m approval workflow for destructive operations
- pg_hardstorage audit - Query the hash-chained audit log
- pg_hardstorage backup - Take a backup of a deployment
- pg_hardstorage capacity - Projected repository size, WAL volume, and pre-flight free-space checks
- pg_hardstorage changelog - Show changelog
- pg_hardstorage classify - Apply a data-classification tag to a deployment
- pg_hardstorage compat - Compatibility helpers for legacy backup tools
- pg_hardstorage completion - Generate shell completion scripts
- pg_hardstorage compliance - Compliance reporting (SOC 2 / ISO 27001 / HIPAA / PCI / FedRAMP-friendly)
- pg_hardstorage cost - Per-deployment / per-tenant repository cost
- pg_hardstorage db - In-database integration (SQL views, upsert helpers)
- pg_hardstorage demo - Run a throwaway end-to-end demo (init → backup → restore → verify) on a temporary PG in Docker
- pg_hardstorage deployment - Manage deployments (add/list/remove/edit/test)
- pg_hardstorage doctor - Run health checks and suggest fixes
- pg_hardstorage dsa - GDPR Data Subject Access helper: locate which backups contain a subject's data
- pg_hardstorage explain - Explain pg_hardstorage commands
- pg_hardstorage fleet - Fleet-wide queries across deployments and backups
- pg_hardstorage forecast - Capacity-planning + cost-projection report
- pg_hardstorage gameday - Opt-in chaos automation
- pg_hardstorage glossary - Look up pg_hardstorage terminology
- pg_hardstorage hold - Legal hold — pin backups against retention sweeps
- pg_hardstorage init - Day-0 setup wizard — connect, init repo, take first backup
- pg_hardstorage insider - Insider-threat detection: scan the audit log for unusual patterns
- pg_hardstorage integrity - Continuous-attestation runs: re-verify manifests + chunks, sign the report
- pg_hardstorage jit - Just-in-time access tokens for break-glass operations
- pg_hardstorage kms - Manage encryption keys
- pg_hardstorage lint - Validate pg_hardstorage.yaml
- pg_hardstorage list - List backups for a deployment, newest first
- pg_hardstorage llm - LLM helper — grounded assistant with skill files, mandatory preview, full audit
- pg_hardstorage logical - Configure logical decoding sinks alongside physical WAL streaming
- pg_hardstorage logs - Tail the pg_hardstorage agent's systemd journal
- pg_hardstorage manifest - Inspect backup manifests
- pg_hardstorage notify - Configure event sinks (slack, webhook, syslog, ...)
- pg_hardstorage partial - Table-level inspection (v0.1) and restore
- pg_hardstorage patroni - Read-only view of a Patroni-managed PostgreSQL cluster
- pg_hardstorage plugin - Discover and inspect Tier-2 plugins
- pg_hardstorage recovery - Recovery-toolkit: readiness scorecard, PITR windows, and more
- pg_hardstorage redact - Post-restore PII redaction (rules-driven UPDATE statements)
- pg_hardstorage repair - Targeted repair tools — explicit, idempotent, audited
- pg_hardstorage repo - Manage the repository
- pg_hardstorage residency - Data-residency pinning for a deployment
- pg_hardstorage restore - Restore a backup to a target directory
- pg_hardstorage rotate - Apply retention policy to a deployment (or all)
- pg_hardstorage runbook - Generate a tailored runbook for the 3am operator
- pg_hardstorage schedule - Set, show, or list deployment backup/rotate schedules
- pg_hardstorage server - Run the control plane
- pg_hardstorage show - Show details of a single backup
- pg_hardstorage slo - RPO / RTO SLOs as code
- pg_hardstorage standby - Hot-standby restore — read-only replica fed entirely from the backup pipeline
- pg_hardstorage status - Show last-backup state for one or all deployments
- pg_hardstorage threshold - k-of-n attestations: multi-party signing for highest-assurance manifests
- pg_hardstorage timetable - Generate scheduling SQL for pg_timetable
- pg_hardstorage timetravel - Spin up an ephemeral read-only PG at a historical state
- pg_hardstorage verify - Verify a backup's signature and chunks (no restore required)
- pg_hardstorage version - Print version information
- pg_hardstorage wal - WAL transport: continuous streaming, push/fetch, list, repair