Backup automation replaces unreliable manual routines with a non-interactive system that creates regular PostgreSQL backups on a schedule or in response to backup events. Manual work varies with distraction, absences, forgotten procedures, and inconsistent timing; automation makes the operation repeatable, but it still requires monitoring and verification. section 9.3 section 9.7
A sound automated backup arrangement should:
- Schedule regular backups with a reliable task scheduler such as cron, or use PostgreSQL-aware software such as Barman or pgBackRest. section 9.3
- Combine appropriate base backups with continuous WAL archiving when Point-in-Time Recovery is required. section 9.3 section 9.7
- Maintain a redundant or offsite copy, monitor backup jobs, and perform a full restore test instead of trusting successful automation alone. section 9.3 section 9.7
- Avoid mixing logical backups such as pg_dump with physical backups and WAL files for PITR. section 9.3
A safer PostgreSQL arrangement
A dedicated Barman server can automatically pull base backups with pg_basebackup and receive WAL through a replication connection for PITR. Barman or pgBackRest can also support multiple locations, retention policies, complex schedules, transfer methods, and parallelization. The arrangement remains incomplete until monitoring detects failures and a full restore confirms recoverability. section 9.3 section 9.7
Figure 9.2 A sample PostgreSQL backup setup with a dedicated Barman server and geographical redundancy showing the possible transfer paths
Use the diagram to trace a dedicated Barman server, geographical redundancy, base-backup transfers, and WAL transfer paths. section 9.3
