Blogacrynite.com

Enable WAL archiving

Configure PostgreSQL to archive write-ahead log segments for point-in-time recovery.

WAL archiving is a PostgreSQL server-level configuration change, applied once per cluster. Enable it against a registered database or cluster.

To S3

$acrynite wal enable production \
$ --storage s3-prod-backups

To a local destination

$acrynite wal enable production \
$ --path /var/lib/acrynite/wal

Check the configuration

$acrynite wal status production

PostgreSQL may need a restart

Acrynite configures PostgreSQL's archive_command to call its internal WAL uploader. The Acrynite executable and configuration must be accessible to the PostgreSQL server process. PostgreSQL may require a restart to activate archive_mode; Acrynite reports when a restart is required.

Settings to review

Depending on your PostgreSQL environment, review:

  • archive_mode
  • wal_level
  • max_wal_senders
  • max_replication_slots
  • pg_hba.conf

Some managed PostgreSQL services do not permit ALTER SYSTEM or custom archive commands.