![]() |
|
PostgreSQL with Barman Backup Setup Guide - Printable Version +- DevOps Discussion Forum (https://forums.geekssolutions.io) +-- Forum: Cloud Computing (https://forums.geekssolutions.io/forumdisplay.php?fid=10) +--- Forum: DevOps (https://forums.geekssolutions.io/forumdisplay.php?fid=14) +--- Thread: PostgreSQL with Barman Backup Setup Guide (/showthread.php?tid=8) |
PostgreSQL with Barman Backup Setup Guide - santosh - 04-07-2026 PostgreSQL with Barman Backup Setup Guide Environment Setup
Architecture Overview Code: [ PostgreSQL Server 10.10.x.x ] ----WAL Archive----> [ Barman Server 10.10.x.x ]Step 1 - Install PostgreSQL Run on: PostgreSQL Server (10.10.x.x) Code: sudo apt updateStep 2 - Configure postgresql.conf Run on: PostgreSQL Server (10.10.x.x) Code: sudo nano /etc/postgresql/14/main/postgresql.confCode: wal_level = replicaStep 3 - Configure pg_hba.conf Run on: PostgreSQL Server (10.10.x.x) Code: sudo nano /etc/postgresql/14/main/pg_hba.confCode: host all barman BARMAN_IP/32 md5Step 4 - Restart PostgreSQL Run on: PostgreSQL Server (10.10.x.x) Code: sudo systemctl restart postgresqlStep 5 - Install Barman Run on: Barman Backup Server (10.10.x.x) Code: sudo apt updateStep 6 - SSH Key Setup Run on: Barman Backup Server (10.10.x.x) Generate SSH key on Barman server: Code: sudo -i -u barmanCopy key to PostgreSQL server: Code: ssh-copy-id -i ~/.ssh/id_rsa.pub postgres@POSTGRES_IPTest SSH connection: Code: ssh postgres@POSTGRES_IPStep 7 - Configure Barman Run on: Barman Backup Server (10.10.x.x) Code: sudo nano /etc/barman.d/main-db-server.confCode: [main-db-server]Step 8 - Create Barman User in PostgreSQL Run on: PostgreSQL Server (10.10.x.x) Code: sudo -i -u postgresStep 9 - Verify Setup Run on: Barman Backup Server (10.10.x.x) Code: sudo -u barman barman check main-db-serverExpected Output: Code: Server main-db-server:Step 10 - Take First Backup Run on: Barman Backup Server (10.10.x.x) Code: sudo -u barman barman backup main-db-serverList backups: Code: sudo -u barman barman list-backup main-db-serverSummary
|