FormingSkillclaude-codepublished fresh until

Postgres backups: pg_dump, pgBackRest, Barman or managed?

Summary As of October 2026, choose pg_dump for portable copies, pgBackRest or Barman for self-hosted WAL recovery, or managed backups for provider-run recovery (checked 2026-10-28). For a configured Barman server, first run barman check <server_name>

Not for a pg_dump restore drill, see test-postgres-backup-restore-pg-dump-pg-restore-into-scratch-database; major upgrades, see postgresql-14-end-of-life-2026-11-12-how-to-upgrade

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v1.0.0Postgres backup choice scan (read-only)
How you use itYou ask for it
What it can dowrites files · runs shell
What's inside
ASkill · v1.0.0Postgres backup choice scan (read-only)
How you use it
You ask for it
What it can do
writes files · runs shell
What's inside

What this thread does

For central backups of multiple self-hosted servers with established Barman skills, start with barman check <server_name> after configuring that server and WAL delivery; replace the placeholder with its configured name before the first backup. Choose pg_dump for portable logical exports, pgBackRest for self-hosted physical recovery, or provider-managed backups when you cannot operate the recovery system; define acceptable data loss and recovery time.

How to choose and establish recovery

1. Write a recovery point objective (maximum data loss) and recovery time objective (maximum downtime). Include accidental deletion, machine loss and loss of access to the hosting account. A nightly export cannot promise recovery to any arbitrary moment between exports. 2. Use the constraint table below. For physical recovery, plan both a base backup and continuous WAL retention; preserving one without the other does not establish the recovery window. Postgres backup concepts. 3. Give backup storage a separate failure boundary, retention policy and access policy. Record who can retrieve encryption keys and how recovery works if the application host is lost. Treat an independent logical export as a complement to physical or managed backups when portability matters. 4. For pgBackRest, configure a repository and cluster stanza, then follow the official stanza-create, check, backup and info workflow. Keep local and remote pgBackRest binaries at exactly matching versions. Official user guide. For Barman, configure each server and WAL delivery, then run barman check <server_name> before the first backup; make failures actionable alerts. Official check guide. 5. Restore to an isolated recovery environment, measure elapsed time, verify expected rows and application startup, and document promotion and reconnect steps. For managed recovery, actually restore a separate instance and test access; a successful backup notification is not the drill.

Versions, licences and operating cost

Every entry checked 2026-10-28; versions are documentation/release baselines, not a promise of compatibility with every server major.

OptionBaseline and licenceWhat you still pay for
pg_dumpPostgreSQL 18 documentation (checked 2026-10-28); PostgreSQL License (checked 2026-10-28)Export execution, storage, transfer and restore time
pgBackRest2.60.0 release (checked 2026-10-28); MIT (checked 2026-10-28)Repository storage, WAL traffic, monitoring and recovery operations
Barman3.20.1 release (checked 2026-10-28); GPLv3 licence text (checked 2026-10-28)Backup infrastructure or object storage and operator time
Managed, illustrated by Amazon RDSService rather than a package version; provider terms applyBackup retention/storage, recovery instance capacity and any cross-region/account copies; obtain an account-specific estimate

Recommendation by constraint

NeedPickNot for
Portable single-database export, selective object restore, migration between machinespg_dump; keep roles/global objects separately as appropriateContinuous recovery or a quick whole-cluster recovery guarantee
Self-hosted cluster, regular full/differential/incremental backups and object-store repositorypgBackRest when your operators can own WAL, retention and drillsA tool that makes PostgreSQL recovery knowledge unnecessary
Central backup management for multiple self-hosted servers and established Barman skillsBarman; choose its streaming, rsync or cloud design deliberatelyReplacing a logical export for selective cross-major migration
Hosted database, small team, provider supports the required recovery windowManaged PITR plus independent exports if neededRecovery after account loss unless copies remain accessible elsewhere

These recommendations are operational judgments. PostgreSQL's SQL dump guide describes consistent logical exports and global-object handling. Barman's backup guide describes server-level backup methods and WAL prerequisites. RDS backup documentation describes automated backups, retention and snapshots; it does not make all managed providers equivalent.

What to test and avoid

  • Measure recovery against production-sized data, not a tiny sample. Include extension availability, roles, ownership, tablespaces, credentials and application reconnection.
  • For PITR, prove a target inside the retained window, including recovery after the most recent base backup. Monitor WAL continuity and backlog as well as backup completion.
  • Prevent recovery drills from writing WAL into the production archive. Follow the recovery tool's documented isolation settings.
  • Do not delete individual backup files or WAL segments by hand to save space. Retention operates on recovery dependencies.
  • A replica can replay an accidental delete; it is not a substitute for a historical recovery path. A physical archive is not a portable logical migration format.

Community evidence

  • In pgBackRest #1616, Tekchanddagar reported a successful restore with missing expected recent data. Maintainer dwsteele distinguished restoring files from PostgreSQL replay; pgstef diagnosed timelines contaminated by a recovery test writing to the same archive. The reporter confirmed isolation/timeline changes resolved their case. This supports isolating drills, not deleting timeline files as a generic fix.
  • In pgBackRest #2834, simon-gratton reports one corrupt restored backup despite a successful previous restore and asks about expiration dependencies. No resolution is established by the visible issue. It supports checking more than backup completion, not any proposed expiration repair.

A prompt for your agent

Read the linked official Postgres, pgBackRest, Barman and provider recovery documentation; your training data may predate current options. Our data-loss tolerance is <value>, downtime tolerance <value>, database size <value>, WAL volume <value>, hosting <value>, operator availability <value>. Recommend one primary recovery system and any independent logical export. Specify access isolation, retention, monitoring, an isolated restore drill and measured acceptance criteria. Do not run a restore or alter a production archive while drafting the plan.

Limits

No backups, restores, corruption tests or recovery timings were run here. Community evidence is concentrated on pgBackRest; no comparative Barman performance or managed-provider recovery benchmark is established. RDS is an example, not a universal promise about hosted Postgres. Compatibility, immutable storage and geographic recovery must be checked for the chosen deployment.

Started from a post by @Tekchanddagar, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Postgres backups: pg_dump, pgBackRest, Barman or managed?
Summary: As of October 2026, choose pg_dump for portable copies, pgBackRest or Barman for self-hosted WAL recovery, or managed backups for provider-run recovery (checked 2026-10-28). For a configured Barman server, first run barman check <server_name>

## Options
- A · Postgres backup choice scan (read-only) · early, no verdict yet · writes files · runs shell
Copy for agent
get the whatworks thread postgres-backups-pg-dump-pgbackrest-barman-or-managed and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread postgres-backups-pg-dump-pgbackrest-barman-or-managed

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Postgres backup choice scan (read-only)

Read-only stdlib Python scan of a project for Postgres backup signals (RDS resources, postgres containers, WAL archiving settings, pgbackrest or barman config, scripted pg_dump) next to a decision matrix from the PostgreSQL, pgBackRest, Barman and AWS RDS docs. Prints signals per option, no verdict; --self-test runs three offline fixture projects.

Format
Skill
Source
—
Pinned
v1.0.0 · sha256:7ec95
Content hash
7ec955922e3d25e6
Audit
scan passed
Can do
writes files · runs shell
Works with
claude-code
Check
Runs three bundled fixture projects in a temp dir offline and asserts the signals; reads no project files.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-pgbackup before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp