Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u9Hrg-0006z0-It for pgsql-general@arkaria.postgresql.org; Mon, 28 Apr 2025 06:21:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u9Hre-00CH13-Ip for pgsql-general@arkaria.postgresql.org; Mon, 28 Apr 2025 06:21:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u9Hre-00CGxT-3j for pgsql-general@lists.postgresql.org; Mon, 28 Apr 2025 06:21:15 +0000 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u9Hrc-002KNI-22 for pgsql-general@postgresql.org; Mon, 28 Apr 2025 06:21:14 +0000 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-7082e46880eso38021877b3.1 for ; Sun, 27 Apr 2025 23:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745821272; x=1746426072; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Fqn/cwVLIR/BDbWPs88jzdDAXlNDbyAJ1I0HnUx/sGA=; b=hwvlYmvfXJYK5HcFhJrK/36OXPd4nuBuGcWH/NaF/SpaspJUMB/LOaxEGAhIn1wfWW asF10esrcyFxPO3LBzfGJoI8yworu2g5DR313NwmaiwqVTJkxC7DBNqaEt4LESnvss3W 3YnifDAooluf/k7+2tXo2G92HP6h2j473xxo+Sx3mLGUoTxqzDcj0KJ7ISIS5aJzAo9B PFovwWFEo5OZMsrUIyUOjKv8WJ+/pz4VYE4YOFO7P8WlFc4d/6mniLYH2ndME+8eRmYe Jqppw/puO9UIdk+hU0eDzMDU8+pmWzqQ8mykNZM0qPv9uZns1t+uCCpYdP2TqG5v5AKw cjJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745821272; x=1746426072; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Fqn/cwVLIR/BDbWPs88jzdDAXlNDbyAJ1I0HnUx/sGA=; b=JBhYOb09zhVl7eJQ/2+0pGOMvX2CrMoWsUUDImmQcyQ17F38C6hmXrybIlobGjOKi5 vuHOZ0XDU9OkXvc2hV6pJZ9frmx93F0YR4m90mGo+QiGzX0znZkOrOvhQpvw/L3ogaGz hgcr70TuBdX7nfO3Gv6kcuF+7LMXjhGMHtVNp+e0NJeVgoR9NLZ47m+UlbHyaO9G+yhq efmM7eOW2tyBe/oHXBRle3OkS9Mgdy5Vs7xyNeNPTuWvo4twbz1PdxC4O04lXkRRzkP3 39aadvSMA9VOpBRJJ0hPVpQWbFGPsyK/RrojoMyHowm63jMbFncOD2J41sPP6fgYM5gR bcJg== X-Gm-Message-State: AOJu0YzSLv8KsTV2qY8WCJB3CiU3oPzYOkNlnYTBaNVInTXyO5xSjRzK IA7PQ6CBoecfhIhPEUHwzHUPwqtg1pndOSmN/yd14drmotJipdE60x4kX6Xw2pJeOjnpwBGwjz4 l5g0hUtIOiCWGq3ADxgr1AdHvWr3/O662 X-Gm-Gg: ASbGncsPAjAyyoosALGyZL7sBQ9v190ZQ9GgeWYSZ/93Ac8NiSGBNuWiTNsTUyB9cSo Gv6WlAc/92lXSAlS5u8yDZnIAfCpERrHzwjC4jZhuyqjNormilt9dzoxgYw6b37s4meXya/bjNJ /UfRI4SZIub+aQwWt7tVeg7tE= X-Google-Smtp-Source: AGHT+IEdeOWYxdwmLuyZmkN7Qg5Uzb6/Fppl1jimFokNew3LZIdMbwdjlwsshpY0V+g/pV0njqKI4imn+9LVxRcO12o= X-Received: by 2002:a05:690c:498b:b0:702:5134:aaac with SMTP id 00721157ae682-708540d9046mr161982007b3.2.1745821272035; Sun, 27 Apr 2025 23:21:12 -0700 (PDT) MIME-Version: 1.0 From: KK CHN Date: Mon, 28 Apr 2025 11:53:21 +0530 X-Gm-Features: ATxdqUEvVOxBAyKwnqboLY-33yAeFbRb-VLO-zVMgbSRbp6ZNVXj-RUwZKw8E3c Message-ID: Subject: pgbackrest with two remote backend servers fails To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000c2e1010633d0b08e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c2e1010633d0b08e Content-Type: text/plain; charset="UTF-8" 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. [root@dbbackup2 ~]# sudo -u pgbackrest pgbackrest --stanza=My_Repo --log-level-console=info check 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= --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 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 ~]# 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 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~]# --000000000000c2e1010633d0b08e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Folks,=C2=A0


= I am able to perfectly run pgbackrest with Single RepoServer works fine.=C2= =A0 =C2=A0(=C2=A0 Stanza=C2=A0 =C2=A0My_Repo created successfully,=C2=A0 = =C2=A0info=C2=A0 Check runs successfully , backup perfectly works)

[ PG 16 server(10.1.2.202) , RHEL9.4, Pgbackrest 2.52.1) b= ackup to remote repo server1 (IP 10.x.4.242, ).=C2=A0 works fine ]



Trying Pgbackrest with = two remote RepoServers for=C2=A0 a Single=C2=A0 DB Cluster .

=
For redundancy I have created another repo server2 (10.x.5= .242) :

While the=C2=A0 DB server and=C2=A0 Primar= y Repo Server are active ,=C2=A0 =C2=A0I created the stanza=C2=A0 =C2=A0 My= _Repo=C2=A0 from the=C2=A0 =C2=A0Repo Server 2=C2=A0 with the stanza-create= command it succeeds. But=C2=A0 when I do the=C2=A0 info check comma= nd=C2=A0 It fails with the following error.=C2=A0

[root= @dbbackup2=C2=A0=C2=A0=C2=A0~]# sudo -u pgbackrest pgbackrest --stanza=3DMy= _Repo =C2=A0--log-level-console=3Dinfo check
2025-04-25 17:41:51.209 P00= =C2=A0 INFO: check command begin 2.52.1: --exec-id=3D626534-c49a6903 --log= -level-console=3Dinfo --log-level-file=3Ddebug --pg1-host=3D 10.1.2.203=C2=A0=C2=A0=C2=A0--pg1-host-user=3Dpostgres=C2=A0 --pg1-path=3D /var/lib/postgresql/16/data=C2=A0=C2=A0=C2=A0--pg-version-force=3D16 --repo= 1-cipher-pass=3D<redacted> --repo1-cipher-type=3Daes-256-cbc --repo1-= path=3D/DBBACKUP --stanza=3DMy_Repo
2025-04-25 17:41:54.054 P00 =C2=A0 I= NFO: check repo2 configuration (primary)
2025-04-25 17:41:54.386 P00 =C2= =A0 INFO: check repo2 archive for WAL (primary)
ERROR: [082]: WAL segmen= t 0000000100000242000000B3 was not archived before the 60000ms timeout
= =C2=A0 =C2=A0 =C2=A0 =C2=A0HINT: check the archive_command to ensure that a= ll options are correct (especially --stanza).
=C2=A0 =C2=A0 =C2=A0 =C2= =A0HINT: check the PostgreSQL server log for errors.
=C2=A0 =C2=A0 =C2= =A0 =C2=A0HINT: run the 'start' command if the stanza was previousl= y stopped.
2025-04-25 17:42:54.386 P00 =C2=A0 INFO: check command end: a= borted with exception [082]
[root@=C2=A0 dbbackup2=C2=A0=C2=A0=C2=A0~]#


After this= step,=C2=A0 The=C2=A0 =C2=A0primary=C2=A0 reposerver=C2=A0 =C2=A0backup al= so fails, it's unable to perform backup due to the WAL archive=C2=A0 60= 000 ms=C2=A0 timeout happening=C2=A0 on db server .=C2=A0

=C2=A0Then I have to stop the=C2=A0 stanza on both=C2=A0 repo serve= rs=C2=A0 and=C2=A0 restart=C2=A0 the stanza on=C2=A0 =C2=A0repo server 1 an= d re-run the=C2=A0stanza-create=C2=A0 My_Repo (Is this required ? no sure != )=C2=A0 =C2=A0on the=C2=A0 Repo Server 1, check command works on the primar= y repo server,=C2=A0 =C2=A0it starts working and performs a backup=C2=A0on= =C2=A0 repo server1 .=C2=A0 =C2=A0 But not getting succeeded for=C2=A0 =C2= =A0Repo server 2=C2=A0 .=C2=A0=C2=A0

What may be w= rong here ? Any hints much appreciated to make=C2=A0 both repo servers star= t=C2=A0taking backups=C2=A0 ..

Thank you .=C2=A0
krishane


=C2=A0pgback= rest confs=C2=A0 =3D>=C2=A0 on Repo1, Repo2 and DB server=C2=A0 as follo= ws

Repo server1 (10.x.4.242)
[root@= dbbackup1 ~]# cat /etc/pgbackrest/pgbackrest.conf
[My_Repo]
pg= 1-host=3D10.1.2.202
pg1-host-user=3Dpostgres
pg1-path=3D/var/lib/post= gresql/16/data
pg-version-force=3D16

[global]
repo1-path=3D/DB= _BACKUP
repo1-block=3Dy
repo1-bundle=3Dy
repo1-retention-full=3D2<= br>repo1-retention-diff=3D2
repo1-cipher-type=3Daes-256-cbc
repo1-cip= her-pass=3Dacbd
process-max=3D5
log-level-console=3Dinfo
log-level= -file=3Ddebug
start-fast=3Dy
delta=3Dy

[global:archive-push]compress-level=3D3




Repo Server 2 : (10.x.5.242)
[root@dbbackup= 2 ~]# cat /etc/pgbackrest/pgbackrest.conf
[My_Repo]
pg1-host=3D10.1.2= .202
pg1-host-user=3Dpostgres
pg1-path=3D /var/lib/postgresql/16/data=
pg-version-force=3D16

[global]
repo2-path=3D/DB_BACKUP
rep= o2-block=3Dy
repo2-bundle=3Dy
repo2-retention-full=3D2
repo2-reten= tion-diff=3D2
repo2-cipher-type=3Daes-256-cbc
repo2-cipher-pass=3Dacb= d
process-max=3D5
log-level-console=3Dinfo
log-level-file=3Ddebug<= br>start-fast=3Dy
delta=3Dy

[global:archive-push]
compress-lev= el=3D3
[root@dbbackup ~]#

ON DB=C2=A0 CLUSTER [= root@db~]#=C2=A0 :=C2=A0 /etc/pgbackrest/pgbackrest.conf=C2=A0
[My_Repo]
pg1-path=3D=C2=A0 /var/lib/postgresql/16/data
= pg1-port=3D5444
pg1-user=3Dpostgres
pg-version-force=3D16


= [global]
repo1-host=3D10.x.4.242
repo1-host-user=3Dpgbackrest

= repo2-host=3D10.x.5.242
repo2-host-user=3Dpgbackrest
archive-a= sync=3Dy
spool-path=3D /var/spool/pgbackrest

log-level-console=3D= info
log-level-file=3Ddebug
log-level-stderr=3Dinfo
delta=3Dy
c= ompress-type=3Dzst

[global:archive-get]
process-max=3D2

[g= lobal:archive-push]
process-max=3D6

[root@db~]#

--000000000000c2e1010633d0b08e--