{"id":"37c8e94a-c341-450e-a05c-9a53350c1ae8","task":"Configure pgBackRest for PostgreSQL base backups and point-in-time recovery","domain":"pgbackrest","steps":["Install pgBackRest on the database server and a repository host (or use an S3-compatible object store); create /etc/pgbackrest/pgbackrest.conf with [global] and [stanza-name] sections defining repo1-path and pg1-path","In postgresql.conf set archive_mode=on and archive_command='pgbackrest --stanza=main archive-push %p'; also set wal_level=replica","Initialize the stanza: pgbackrest --stanza=main stanza-create, then run a full backup: pgbackrest --stanza=main --type=full backup","Schedule incremental backups with cron; pgBackRest automatically expires old backups per repo1-retention-full and retains WAL to support PITR across retained backups","To restore to a point in time: stop PostgreSQL, run pgbackrest --stanza=main --type=time '--target=2025-06-10 14:30:00' --target-action=promote restore, then start PostgreSQL","Verify backup integrity periodically with pgbackrest --stanza=main check and pgbackrest info"],"gotchas":["repo1-retention-archive-type and repo1-retention-archive control how much WAL is kept; setting repo1-retention-archive lower than the number of full backups retained will silently drop WAL needed for PITR from older backups","The archive_command runs as the PostgreSQL OS user; ensure pgBackRest's repository is readable/writable by that user and that SSH keys or object-store credentials are configured before enabling archiving","pgBackRest's restore overwrites the data directory; always test your recovery procedure in a staging environment and keep the original data directory backed up until the restore is validated"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/37c8e94a-c341-450e-a05c-9a53350c1ae8"}