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 1sg2Ji-00EoG0-Lk for pgsql-general@arkaria.postgresql.org; Mon, 19 Aug 2024 13:21:02 +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 1sg2Jf-003BsW-Ki for pgsql-general@arkaria.postgresql.org; Mon, 19 Aug 2024 13:21:00 +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 1sg2Jf-003BsM-9K for pgsql-general@lists.postgresql.org; Mon, 19 Aug 2024 13:21:00 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sg2Jd-000PQm-EI for pgsql-general@postgresql.org; Mon, 19 Aug 2024 13:20:58 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3db157cb959so2637384b6e.0 for ; Mon, 19 Aug 2024 06:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724073657; x=1724678457; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=m2LoIdezLq7afL1k2uRTocC42Zm8hm19xrJK+khDUB4=; b=PrzrpvcfH6wzEJ6FsfV+YtCy+9nKRLDoFf4/BaYQDeg95cZ68LP0W4p2vr/SrdFdFt 4npTSoQSpcC0cY/Y5Q7JXk6bvc/xC7apeXFLKHzk+oDVXtWAT938F33NDixzjkTVDgyV DPbcU+rBM9lVSQ41HmszobxrrSF3UIKHwRiIvOsKQ1aDoZoFTrdNA19KNGp3fpP/y6x4 myHmQhhZn+VgJ/h7klQHtsydjdcqmQG4qLRUUHUmqfgQCzLTHRbjJ157iQ2w2/1MSeh4 at30blqa6brjz5WFlPsDHZP8p1CNDDQqmI2RQ84RSA9/LHoLOytGKFJ2ftKKwpSVAiXE rncA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724073657; x=1724678457; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=m2LoIdezLq7afL1k2uRTocC42Zm8hm19xrJK+khDUB4=; b=qYtvfDLXcgE0z3lnMr8kbMRHVY4jDqBQR2GWa2PZ/2kURv6c6GNCGnWhx0K9mFkhbY Dz3GE60KsnTtkaPNYplbGFFWPVlCOxydAjUtrii32El2hArcaxF9XQ3HnlMbixlYwO1s UzwgheLBnhW5WA9j/20Xk89QtTkDSVp01SuVOF9exDZQjpBY5WQJG1OwCrKm1nPdGWIv w2VatCfFzfiH65rontGdEdXtNFNJhrknjWW5+MNAcrfccmk02qubm69i1wscRjgIlR/j A2LX6xRZdLf+zCuy+NhnlgPO2EKaYyFUUyJ6MmPn3lDGtbPEtx7JpRJX9PW2nwjL9btT fjfA== X-Gm-Message-State: AOJu0YwfRx65U7RR58yqROhqmcZXMMiJFyL48WiEvD/usIgRd5y+MdcW hVEfBw2dxf4X5O/1z/8IGAxzgMg6axwh/w4RDc34hKMbM8c6hyYyxWeKSj1xcSPs4mRRA7FqxfL 3Ze2y2/XvBiuAz/Mha9FIZgJu3mU= X-Google-Smtp-Source: AGHT+IFvK9XmDtuTjp6fSdKjoNV/UxTu0w4ZC3lCZnIAVYfYXuWJ7XPjy3/YN2HRLwPscMXdFkyOUiNj+yOoMLxvd+w= X-Received: by 2002:a05:6808:22a2:b0:3dd:3171:6d03 with SMTP id 5614622812f47-3dd3aad5019mr12985643b6e.0.1724073655876; Mon, 19 Aug 2024 06:20:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ruben Morais Date: Mon, 19 Aug 2024 14:20:44 +0100 Message-ID: Subject: Re: WAL replication and Archive command for pgbackrest on same server conf To: KK CHN Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000d340dd0620092dac" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d340dd0620092dac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable hi, you can combine: archive_command =3D 'pgbackrest --stanza=3DDemo archive-push %p && cp %p /data/archive/%f ' You need to change your standby replica to consume the wals from pgbackrest if you want instead to use both commands. *R=C3=BAben Morais* *(+351) 965775713* *ruben.gmorais@gmail.com * On Mon, Aug 19, 2024 at 2:10=E2=80=AFPM KK CHN wrote: > Hi List , > > I am trying to configure the pgbackrest on a live server ( RHEL9, EPAS16 > and Pgbacrest .2.52) which is having a working WAL archive > configuration to a standby server in postgresql.conf as follows > > > 1. archive_mod =3Don > 2. archive_level=3Dreplica > 3. archive_command =3D 'cp %p /data/archive/%f' > > > To do the pgbackrest conf on the same archive_command directive (So > both the existing WAL configuration as well as my new pgbackrest option > both will work smoothly. how to add an entry in line 3 ?? > > archive_command =3D 'pgbackrest --stanza=3DDemo archive-push cp %p > /data/archive/%f ' > > > > Please correct me If I am doing wrong in the above line.. > > > Thank you, > Krish > --000000000000d340dd0620092dac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
hi,=C2=A0

you can combine:
archive_command =3D 'pgbackrest --stanza=3DDemo=C2=A0 arch= ive-push=C2=A0 %p && cp %p /data/archive/%f '

You need to change your standby replica to consume the wals=C2=A0fr= om pgbackrest if you want instead to use both commands.

<= div dir=3D"ltr">
R=C3=BAben Morais

=C2=A0(+351) 965775713=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ruben.gmorais@gmail.com


=
On Mon, Aug 19, 2024 at 2:10=E2=80=AF= PM KK CHN <kkchn.in@gmail.com&= gt; wrote:
Hi List ,

I am trying to configure the pgbac= krest=C2=A0 on a live server ( RHEL9, EPAS16 and Pgbacrest .2.52)=C2=A0 whi= ch is having a working=C2=A0 =C2=A0WAL archive configuration=C2=A0 to a sta= ndby server in postgresql.conf as follows


1. archive_mod =3Don
2. archive_level=3Dreplica
3. archive_co= mmand =3D 'cp %p /data/archive/%f'=C2=A0=C2=A0
=

To do the pgbackrest conf on the same=C2=A0 = =C2=A0archive_command=C2=A0 =C2=A0directive (So both the existing WAL=C2=A0= configuration as well as my new pgbackrest option both will work smoothly.= =C2=A0 =C2=A0how to add an entry=C2=A0 in line 3=C2=A0 ??

archive_command =3D 'pgbackrest --stanza=3DDemo=C2=A0 archive-p= ush=C2=A0 cp %p /data/archive/%f '


<= div>
Please correct me If I am doing wrong in the above line.= .


Thank you,
Krish=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
--000000000000d340dd0620092dac--