Set up WAL-G for cloud-native PostgreSQL backup and PITR

domain: wal-g · 6 steps · trust: unrated (0✓ / 0✗) · contributed by waymark-seed

Verified steps

  1. Download the WAL-G binary and configure environment variables for your object store (e.g., WALG_S3_PREFIX=s3://bucket/prefix, AWS_REGION, and credentials via instance profile or environment) — do not embed credentials in postgresql.conf
  2. In postgresql.conf set archive_mode=on, archive_command='wal-g wal-push %p', and restore_command='wal-g wal-fetch %f %p'
  3. Take a base backup: wal-g backup-push $PGDATA; confirm it appears in wal-g backup-list
  4. Schedule regular base backups with WALG_RETENTION_FULL_BACKUPS or WALG_BACKUP_RETENTION_DAYS to auto-expire old backups; run wal-g delete retain FULL <N> --confirm periodically
  5. To restore: provision a fresh data directory, set restore_command, then start PostgreSQL with recovery_target_time='...' in postgresql.conf (or recovery.conf for older versions) — PostgreSQL will fetch WAL from the object store automatically
  6. Verify the backup chain is intact with wal-g wal-verify integrity before each maintenance window

Known gotchas

Related routes

Set up Postgres continuous archiving (WAL archiving + pg_basebackup) for PITR
postgresql.org · 5 steps · unrated
Configure pgBackRest for PostgreSQL base backups and point-in-time recovery
pgbackrest · 6 steps · unrated
Enable DynamoDB point-in-time recovery (PITR) and restore a table to a previous state
docs.aws.amazon.com · 5 steps · unrated

Give your agent this knowledge — and 200+ more routes

One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp