Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

pgBackRest

$ pgbackrest Community High Risk
pgBackRest · Database & Data · MIT · macos / linux

pgbackrest 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.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
brew install pgbackrest
CLI vs MCP Decision CLI Only

pgbackrest manages high-throughput PostgreSQL WAL archiving, parallel block backups, and cluster restores directly on database hosts; MCP cannot replace it.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Fully non-interactive with --output=json on info, PGBACKREST_* env var overrides for every option, and deterministic exit codes.

  • pgbackrest info --output=json and full PGBACKREST_* env var mapping
Trust & Safety 21 / 25

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 / verify commands and live-cluster restore guards
Setup & Portability 12 / 15

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
Utility & Efficiency 13 / 15

Handles full/diff/incr backups, compression, encryption, parallel transfer, and PITR restore in one tool.

  • Complete parallel backup, WAL archiving, and PITR lifecycle
Maintenance & Lineage 8 / 10

Mature PostgreSQL ecosystem project (pgbackrest/pgbackrest) under MIT license.

  • Active pgbackrest/pgbackrest repository under MIT license
Docs & Verifiability 8 / 10

Extensive command and configuration reference at pgbackrest.org/command.html.

  • Detailed official documentation at pgbackrest.org

Security, Auth & Guardrails

Auth Modes
Config File Env API Key Service Account
Credential Storage

Reads stanza and object-store settings from /etc/pgbackrest/pgbackrest.conf (or --config) and PGBACKREST_* environment variables.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

MIT open-source CLI; remote S3/GCS/Azure backup storage incurs cloud costs.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Inspect stanza backup inventory as JSON
pgbackrest --stanza=main info --output=json

Outputs structured JSON detailing backup timestamps, WAL ranges, sizes, and repo status.

Verify archive and repository health
pgbackrest --stanza=main check

Validates PostgreSQL archive_command delivery and repository connectivity without creating a backup.

Controlled Writes & Previews

Trigger an incremental backup for a stanza
pgbackrest --stanza=main --type=incr backup

Runs an incremental backup of the main PostgreSQL stanza into the configured repository.

Strengths for Agents

  • + info --output=json provides comprehensive, machine-parseable backup and WAL metadata.
  • + check and verify validate repository health and backup integrity safely.

Caveats & Pitfalls

  • ! No --dry-run option for backup or expire; operational testing requires a staging stanza.
  • ! Linux/macOS only (no native Windows support) and requires stanza configuration files.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI