pgBackRest
$ pgbackrest Community High Riskpgbackrest is a production-grade PostgreSQL backup, WAL archiving, and point-in-time recovery (PITR) CLI supporting local, S3, GCS, and Azure repositories. pgbackrest info --output=json emits exhaustive structured metadata ideal for agent health checks.
brew install pgbackrest pgbackrest manages high-throughput PostgreSQL WAL archiving, parallel block backups, and cluster restores directly on database hosts; MCP cannot replace it.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Fully non-interactive with --output=json on info, PGBACKREST_* env var overrides for every option, and deterministic exit codes.
pgbackrest info --output=jsonand fullPGBACKREST_*env var mapping
Checksum verification, check/verify validation commands, and refusal to restore over a live Postgres instance reduce catastrophic mistakes, though there is no --dry-run on backup.
- Built-in
check/verifycommands and live-cluster restore guards
Native C binary available via Homebrew and PostgreSQL PGDG apt/yum repos on Linux and macOS (not native Windows).
- Distributed via Homebrew and PGDG packages for Linux/macOS
Handles full/diff/incr backups, compression, encryption, parallel transfer, and PITR restore in one tool.
- Complete parallel backup, WAL archiving, and PITR lifecycle
Mature PostgreSQL ecosystem project (pgbackrest/pgbackrest) under MIT license.
- Active
pgbackrest/pgbackrestrepository under MIT license
Extensive command and configuration reference at pgbackrest.org/command.html.
- Detailed official documentation at pgbackrest.org
Security, Auth & Guardrails
Reads stanza and object-store settings from /etc/pgbackrest/pgbackrest.conf (or --config) and PGBACKREST_* environment variables.
MIT open-source CLI; remote S3/GCS/Azure backup storage incurs cloud costs.
# pgBackRest Agent Rules - Run `pgbackrest --stanza=<name> info --output=json` and `check` before scheduling backups or restores. - Never pass `--delta` or `restore` against a running PostgreSQL data directory. - Keep repository encryption passphrases and S3 keys in protected config files or `PGBACKREST_*` env vars.
Agent-Ready Command Recipes
Safe Read-Only Queries
pgbackrest --stanza=main info --output=json
Outputs structured JSON detailing backup timestamps, WAL ranges, sizes, and repo status.
pgbackrest --stanza=main check
Validates PostgreSQL archive_command delivery and repository connectivity without creating a backup.
Controlled Writes & Previews
pgbackrest --stanza=main --type=incr backup
Runs an incremental backup of the main PostgreSQL stanza into the configured repository.
Strengths for Agents
- +
info --output=jsonprovides comprehensive, machine-parseable backup and WAL metadata. - +
checkandverifyvalidate repository health and backup integrity safely.
Caveats & Pitfalls
- ! No
--dry-runoption forbackuporexpire; operational testing requires a staging stanza. - ! Linux/macOS only (no native Windows support) and requires stanza configuration files.