Thread: pgbackrest with two remote backend servers fails
Folks,
I am able to perfectly run pgbackrest with Single RepoServer works fine. ( Stanza My_Repo created successfully, info Check runs successfully , backup perfectly works)
[ PG 16 server(10.1.2.202) , RHEL9.4, Pgbackrest 2.52.1) backup to remote repo server1 (IP 10.x.4.242, ). works fine ]
Trying Pgbackrest with two remote RepoServers for a Single DB Cluster .
For redundancy I have created another repo server2 (10.x.5.242) :
While the DB server and Primary Repo Server are active , I created the stanza My_Repo from the Repo Server 2 with the stanza-create command it succeeds. But when I do the info check command It fails with the following error.
2025-04-25 17:41:51.209 P00 INFO: check command begin 2.52.1: --exec-id=626534-c49a6903 --log-level-console=info --log-level-file=debug --pg1-host= 10.1.2.203 --pg1-host-user=postgres --pg1-path= /var/lib/postgresql/16/data --pg-version-force=16 --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/DBBACKUP --stanza=My_Repo
2025-04-25 17:41:54.054 P00 INFO: check repo2 configuration (primary)
2025-04-25 17:41:54.386 P00 INFO: check repo2 archive for WAL (primary)
ERROR: [082]: WAL segment 0000000100000242000000B3 was not archived before the 60000ms timeout
HINT: check the archive_command to ensure that all options are correct (especially --stanza).
HINT: check the PostgreSQL server log for errors.
HINT: run the 'start' command if the stanza was previously stopped.
2025-04-25 17:42:54.386 P00 INFO: check command end: aborted with exception [082]
[root@ dbbackup2 ~]#
After this step, The primary reposerver backup also fails, it's unable to perform backup due to the WAL archive 60000 ms timeout happening on db server .
Then I have to stop the stanza on both repo servers and restart the stanza on repo server 1 and re-run the stanza-create My_Repo (Is this required ? no sure !) on the Repo Server 1, check command works on the primary repo server, it starts working and performs a backup on repo server1 . But not getting succeeded for Repo server 2 .
What may be wrong here ? Any hints much appreciated to make both repo servers start taking backups ..
Thank you .
krishane
pgbackrest confs => on Repo1, Repo2 and DB server as follows
Repo server1 (10.x.4.242)
[root@dbbackup1 ~]# cat /etc/pgbackrest/pgbackrest.conf
[My_Repo]
pg1-host=10.1.2.202
pg1-host-user=postgres
pg1-path=/var/lib/postgresql/16/data
pg-version-force=16
[global]
repo1-path=/DB_BACKUP
repo1-block=y
repo1-bundle=y
repo1-retention-full=2
repo1-retention-diff=2
repo1-cipher-type=aes-256-cbc
repo1-cipher-pass=acbd
process-max=5
log-level-console=info
log-level-file=debug
start-fast=y
delta=y
[global:archive-push]
compress-level=3
pg1-host=10.1.2.202
pg1-host-user=postgres
pg1-path=/var/lib/postgresql/16/data
pg-version-force=16
[global]
repo1-path=/DB_BACKUP
repo1-block=y
repo1-bundle=y
repo1-retention-full=2
repo1-retention-diff=2
repo1-cipher-type=aes-256-cbc
repo1-cipher-pass=acbd
process-max=5
log-level-console=info
log-level-file=debug
start-fast=y
delta=y
[global:archive-push]
compress-level=3
Repo Server 2 : (10.x.5.242)
[root@dbbackup2 ~]# cat /etc/pgbackrest/pgbackrest.conf
[My_Repo]
pg1-host=10.1.2.202
pg1-host-user=postgres
pg1-path= /var/lib/postgresql/16/data
pg-version-force=16
[global]
repo2-path=/DB_BACKUP
repo2-block=y
repo2-bundle=y
repo2-retention-full=2
repo2-retention-diff=2
repo2-cipher-type=aes-256-cbc
repo2-cipher-pass=acbd
process-max=5
log-level-console=info
log-level-file=debug
start-fast=y
delta=y
[global:archive-push]
compress-level=3
[root@dbbackup ~]#
[My_Repo]
pg1-host=10.1.2.202
pg1-host-user=postgres
pg1-path= /var/lib/postgresql/16/data
pg-version-force=16
[global]
repo2-path=/DB_BACKUP
repo2-block=y
repo2-bundle=y
repo2-retention-full=2
repo2-retention-diff=2
repo2-cipher-type=aes-256-cbc
repo2-cipher-pass=acbd
process-max=5
log-level-console=info
log-level-file=debug
start-fast=y
delta=y
[global:archive-push]
compress-level=3
[root@dbbackup ~]#
ON DB CLUSTER [root@db~]# : /etc/pgbackrest/pgbackrest.conf
[My_Repo]
pg1-path= /var/lib/postgresql/16/data
pg1-port=5444
pg1-user=postgres
pg-version-force=16
[global]
repo1-host=10.x.4.242
repo1-host-user=pgbackrest
repo2-host=10.x.5.242
pg1-path= /var/lib/postgresql/16/data
pg1-port=5444
pg1-user=postgres
pg-version-force=16
[global]
repo1-host=10.x.4.242
repo1-host-user=pgbackrest
repo2-host=10.x.5.242
repo2-host-user=pgbackrest
archive-async=y
spool-path= /var/spool/pgbackrest
log-level-console=info
log-level-file=debug
log-level-stderr=info
delta=y
compress-type=zst
[global:archive-get]
process-max=2
[global:archive-push]
process-max=6
[root@db~]#
archive-async=y
spool-path= /var/spool/pgbackrest
log-level-console=info
log-level-file=debug
log-level-stderr=info
delta=y
compress-type=zst
[global:archive-get]
process-max=2
[global:archive-push]
process-max=6
[root@db~]#