Configuration·PostgreSQL
PostgreSQL WAL Archiving and Recovery Readiness
A base backup restores last night. WAL archiving is what covers everything since - and `pg_stat_archiver` is the one view that tells you whether it is actually working before you need it to be.
Backup and Restore Guide 25 of 47 Advanced
- OSUbuntu 26.04 LTS (resolute)
- PostgreSQL18.6-0ubuntu0.26.04.1
- wal_levelreplica
- TimeAbout 17 min
- Reviewed27 August 2026
Written against the versions above. `wal_level = replica` is the default and is sufficient for archiving and streaming replication. `logical` is only needed for logical decoding.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| db-a01 | 192.168.0.81 | Ubuntu 26.04 LTS | Primary / Source / Replica Set Member 1 | 2 Core | 4 GB | 50 GB |
Before you start
- A base backup - see the previous guide.
- Somewhere to archive WAL to. This guide uses a local directory, which is adequate for a lab and inadequate for anything real.
-
Read the settings archiving depends on
-
Turn archiving on
-
Generate WAL and watch it arrive
-
Confirm the archiver is actually keeping up