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 1sUQth-002zV9-42 for pgsql-general@arkaria.postgresql.org; Thu, 18 Jul 2024 13:10:13 +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 1sUQte-00G8kG-0y for pgsql-general@arkaria.postgresql.org; Thu, 18 Jul 2024 13:10:10 +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 1sUQtd-00G8k7-DX for pgsql-general@lists.postgresql.org; Thu, 18 Jul 2024 13:10:10 +0000 Received: from mail-yw1-x1133.google.com ([2607:f8b0:4864:20::1133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sUQta-000C28-Dj for pgsql-general@postgresql.org; Thu, 18 Jul 2024 13:10:08 +0000 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-65f9708c50dso7147037b3.2 for ; Thu, 18 Jul 2024 06:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721308206; x=1721913006; 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=KKh0KRisQdVfZrryXBl2Lb5tbxP86NJvIGhLesZQmRs=; b=S/t/f35BEphxqn7s9LGUKPPEbJa2gmOrA5mytDCX6lVPQhWo4uMvVhTFB4Hl+Gal6g jy3ZnoQHQ0X2pTt0Fr9zYrX7JN0hzzS2k1Ae+MeunOCSqYmK6zpe+dU0kNxm7HEOC2mD IyC/ZXgpu3amh0BQTqNBzD3DYIPMH+PnaeL1zXvl9ldqzEnuShxQXvGXaDkDu5G/SysR OezcTzo37eYTZSAxlPgMJ9rGwsGQhg0fOvgCUPIiw6uyLKEeH/g7in0Zv/63ooQamSDn UrD30EgnVVfdoaG5TvUVCcW/QfWkkmd/S26subPIOpPO32f2HsyV691ouf/gtNEPWw2Q zA8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721308206; x=1721913006; 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=KKh0KRisQdVfZrryXBl2Lb5tbxP86NJvIGhLesZQmRs=; b=VtsPG26uYSjnseHNQZDDOxzJ+WiyaL3vL/VADTht4DuOgrLuLxQda6dXUN1fBpwFVT sneOFE3FRavgfrLCxAgZuL+GAo8HzQgxjjx7K0qFNi1hm0m1JD5R6JvnioSx2iFZzZrU syMLs7LgtsY/H88tOaV/lJT7olplA1Iu9jk4xBq/Nm0OYEKc7qQCthmD5vFRV9FyQQBf iLyiUzlw2tLkX4wrvbEwJEf3/eJbvrb/MWp+MXDdqMc6ZpCEvdZk4AU7ijBOFu5lvOqn R+7es44r2CM/vlEA7icv9owC0WvXt/NlgnV04h94iC9Md3qmzBPIXUtRnkFuEcFZiECd IGEA== X-Gm-Message-State: AOJu0Yz3ac3rViK9ZCbG7NBGNgoU6Hz8z0Yq9PuAGz0x+cwXBOdlzXx2 v/VWeMznWjmFPOwXCgg/mqMhx6RLua1Tzte6KLOqKCfF57uW1YynxjnPRBg1hP/vxpymZCL1VIe praTMfXRk7dnp5n4Zx5V2kxj1Pk0= X-Google-Smtp-Source: AGHT+IFV1+2Xn+9eXys9Q4UANhKlEhxaEsZ7F9+vqoYUEZXg0ZCRJpb2dFJtYVDEALbcAOsx1elkfM+jikQjDWV590c= X-Received: by 2002:a81:c312:0:b0:650:9c5e:f6db with SMTP id 00721157ae682-664fee0d336mr58097157b3.18.1721308205416; Thu, 18 Jul 2024 06:10:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: KK CHN Date: Thu, 18 Jul 2024 18:49:07 +0530 Message-ID: Subject: Re: PgbackRest and EDB Query To: Kashif Zeeshan Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000220b5e061d854c3c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000220b5e061d854c3c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi list, Thank you all for your inputs, I am trying pgbacrest with Enterprised DB. Locally pgbackrest works for EDB but when I am trying for remote repository I am facing an issue ( from the remote host to EDB server password less authentication part ) Trying to use a remote host as Repo Server I am facing the issue of passwordless authentication(Public key private key). 1. From the EDB server I added the user pgbackrest directory and generated ssh-keys and copied the id_rsa.pub to the Repo server (pgbackrest user's .ssh dir with necessary permissions) everything(passwordless auth) working to one side. From the EDB Postgres Advanced Server nodes $ sudo -u enterprisedb ssh pgbackrest@backup-server This works from EDB server machine without any issue(password less auth works) 2 But from the reposerver $sudo -u pgbackrest ssh enterprisedb@EDB_Server_IP unable to do password less auth( Its asking password for enterpridb@EDB_Server ) How to do the passwordless auth from the Repo server to the EDB server for the default "enterprisedb" user of EDB ? ( enterprisedb user doesn't have any home dir I mean /home/enterprisedb, so I am not sure where to create .ssh dir and authorized_keys for passwordless auth ) Any one who has already tackled this kindly guide me on how to achieve this . Thank you, Krishane On Wed, Jul 17, 2024 at 9:07=E2=80=AFPM Kashif Zeeshan wrote: > Hi > > On Wed, Jul 17, 2024 at 5:21=E2=80=AFPM KK CHN wrote= : > >> Hi , >> >> I am trying pgbackrest(2.52.1) with postgresql( version 16) on a lab >> setup on RHEL-9. Both PostgreSQL server and a remote Repository host >> configured with pgbackrest and everything working fine as specified in t= he >> documentation. >> >> note: here I am running postgres server and pgbackrest everything as >> postgres user and no issues in backup and recovery. >> >> >> >> Query >> 1. Is it possible to use PgBackrest with EnterpriseDB(EDB -16) for the >> backup and recovery process? Or pgback works only with the community >> PostgreSQL database ? >> > It support both community PG and EDB PG. > >> >> >> [ when I ran initdb script of EDB while installing EDB it creates the >> enterpisedb as user and edb as initial database by the script. ] >> > Enterprisedb is the default user created by EDB. > >> >> >> when I try to create the stanza on the EDB server it throws error >> (pasted at bottom ). >> >> >> >> NOTE: >> I know that my EDB running on port 5444 instead of 5432 and the >> dbname =3D edb instead of postgres, and user as enterpisedb instead of >> postgres how to specify these changes in the stanza creation step if ED= B >> Supports pgbackrest tool ? >> > You can enter this connection information in the PbBackRest Conf file for > the stanza you create for your EDB Instance. > > e.g > > [global]repo1-path=3D/var/lib/edb/as15/backups > [demo]pg1-path=3D/var/lib/edb/as15/datapg1-user=3Denterprisedbpg1-port=3D= 5444pg-version-force=3D15 > > Refer to following edb documentation > > > https://www.enterprisedb.com/docs/supported-open-source/pgbackrest/03-qui= ck_start/ > > >> OR Am I doing a waste exercise [if pgbackrest won't go ahead with EDB >> ] ? >> >> >> Any hints much appreciated. >> >> Thank you, >> Krishane >> >> >> ERROR: >> root@uaterssdrservice01 ~]# sudo -u postgres pgbackrest --stanza=3DOD_DM= 2 >> --log-level-console=3Dinfo stanza-create >> 2024-07-17 17:42:13.935 P00 INFO: stanza-create command begin 2.52.1: >> --exec-id=3D1301876-7e055256 --log-level-console=3Dinfo --log-level-file= =3Ddebug >> --pg1-path=3D/var/lib/pgsql/16/data --repo1-host=3D10.x.y.7 >> --repo1-host-user=3Dpostgres --stanza=3DOD_DM2 >> WARN: unable to check pg1: [DbConnectError] unable to connect to >> 'dbname=3D'postgres' port=3D5432': connection to server on socket >> "/tmp/.s.PGSQL.5432" failed: No such file or directory >> Is the server running locally and accepting connections on that >> socket? >> ERROR: [056]: unable to find primary cluster - cannot proceed >> HINT: are all available clusters in recovery? >> 2024-07-17 17:42:13.936 P00 INFO: stanza-create command end: aborted >> with exception [056] >> [root@uaterssdrservice01 ~]# >> >> >> >> >> --000000000000220b5e061d854c3c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Hi list,=C2=A0

Thank you all for your=C2=A0 inp= uts, I am trying pgbacrest=C2=A0with Enterprised=C2=A0DB.=C2=A0 Locally pgb= ackrest works for=C2=A0 EDB but when I am trying for remote repository I am= facing an issue ( from the remote host to=C2=A0 EDB server=C2=A0 password = less authentication part )

Trying to=C2=A0 use a r= emote host=C2=A0 as Repo Server I am facing the issue of=C2=A0 passwordless= =C2=A0 authentication(Public key private key).

1.= =C2=A0 From the EDB server=C2=A0 I=C2=A0 added the user pgbackrest director= y and generated ssh-keys and copied the id_rsa.pub=C2=A0 =C2=A0to=C2=A0 the= Repo server (pgbackrest user's .ssh dir with necessary permissions) ev= erything(passwordless auth) working to one side.
From the EDB Postgres Advanced Server nodes
$ sudo -u enterprisedb=
 ssh pgbackrest@backup-server
This works from=C2=A0 EDB server machine without any issue(password l= ess auth works)



2 Bu= t=C2=A0 =C2=A0from the reposerver=C2=A0 =C2=A0 =C2=A0=C2=A0
$sudo= -u pgbackrest=C2=A0 =C2=A0ssh enterprisedb@EDB_Server_IP=C2=A0 =C2=A0 =C2= =A0 =C2=A0unable to do password less auth( Its asking password for enterpri= db@EDB_Server )

How to do the passwordless auth=C2= =A0 from the=C2=A0 Repo server to the EDB server=C2=A0 for the default &quo= t;enterprisedb" user of=C2=A0 EDB ? ( enterprisedb user doesn't ha= ve any home dir=C2=A0 I mean /home/enterprisedb, so I am not sure where to = create .ssh dir and authorized_keys for=C2=A0 passwordless auth=C2=A0 )=C2= =A0

Any one who has already tackled this kindly gu= ide=C2=A0 me on how to achieve this .


Thank you,=C2=A0
Krishane


<= div>




On Wed, Jul 17, 2024= at 9:07=E2=80=AFPM Kashif Zeeshan <kashi.zeeshan@gmail.com> wrote:
Hi=C2=A0
On = Wed, Jul 17, 2024 at 5:21=E2=80=AFPM KK CHN <kkchn.in@gmail.com> wrote:
Hi ,=C2=A0<= div>
I am trying pgbackrest(2.52.1)=C2=A0 with postgresql( ve= rsion 16)=C2=A0 on=C2=A0 a lab setup on=C2=A0RHEL-9. Both=C2=A0 PostgreSQL = server and a remote Repository host configured with pgbackrest and everythi= ng=C2=A0working fine as specified in the documentation.=C2=A0=C2=A0

note:=C2=A0 here I am running postgres server and pgbackr= est everything as postgres user and no issues in=C2=A0 backup and recovery.= =C2=A0



Query
1. Is it possible to use=C2=A0 PgBackrest with=C2=A0 EnterpriseDB(EDB -1= 6) for the backup and recovery process?=C2=A0Or pgback works only with the = community=C2=A0 PostgreSQL database ?
It suppo= rt both community PG and EDB PG.=C2=A0


[ wh= en I ran=C2=A0 initdb script of EDB while installing EDB it creates the ent= erpisedb=C2=A0 as user and edb as initial=C2=A0 database by the script. ]
Enterprisedb=C2=A0is the default user creat= ed by EDB.=C2=A0


when I try to c= reate the stanza on the EDB server it throws error=C2=A0 (pasted at bottom = ).



NOTE:=C2=A0
=
I know that=C2=A0 my EDB=C2=A0 running on=C2=A0 port 5444 instead of= =C2=A0 5432 and the dbname =3D edb instead of postgres, and user as=C2=A0 e= nterpisedb instead of postgres how to specify these changes in the stanza c= reation step if=C2=A0 EDB Supports pgbackrest tool ?=C2=A0 =C2=A0
You can enter this connection information in the PbBack= Rest Conf file for the stanza you create for your EDB Instance.
= =C2=A0
e.g
[global]
repo1-path=3D/var/lib/edb/as15/backups

[demo]
pg1-path=
=3D/var/lib/edb/as15/data
pg1-user=
=3Denterprisedb
pg1-port=
=3D5444
pg-version-forc=
e=3D15
Refer t= o following edb documentation

=C2=A0
OR=C2=A0 = =C2=A0Am I doing a waste exercise=C2=A0 [if pgbackrest won't go ahead w= ith EDB ] ?


Any hints much apprecia= ted.=C2=A0

Thank you,
Krishane


ERROR:
root@uaterssdrservice01 ~]#= sudo -u postgres pgbackrest --stanza=3DOD_DM2 --log-level-console=3Dinfo = =C2=A0stanza-create
2024-07-17 17:42:13.935 P00 =C2=A0 INFO: stanza-crea= te command begin 2.52.1: --exec-id=3D1301876-7e055256 --log-level-console= =3Dinfo --log-level-file=3Ddebug --pg1-path=3D/var/lib/pgsql/16/data --repo= 1-host=3D10.x.y.7 --repo1-host-user=3Dpostgres --stanza=3DOD_DM2
WARN: u= nable to check pg1: [DbConnectError] unable to connect to 'dbname=3D= 9;postgres' port=3D5432': connection to server on socket "/tmp= /.s.PGSQL.5432" failed: No such file or directory
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 Is the server running locally and accepting connections on that = socket?
ERROR: [056]: unable to find primary cluster - cannot proceed=C2=A0 =C2=A0 =C2=A0 =C2=A0HINT: are all available clusters in recovery?2024-07-17 17:42:13.936 P00 =C2=A0 INFO: stanza-create command end: abort= ed with exception [056]
[root@uaterssdrservice01 ~]#

<= /div>



--000000000000220b5e061d854c3c--