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 1r51ng-00BUOu-MO for pgsql-general@arkaria.postgresql.org; Mon, 20 Nov 2023 10:46:44 +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 1r51nf-007jXl-9g for pgsql-general@arkaria.postgresql.org; Mon, 20 Nov 2023 10:46:43 +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 1r51ne-007jWx-MK for pgsql-general@lists.postgresql.org; Mon, 20 Nov 2023 10:46:42 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r51nb-006Sfd-AO for pgsql-general@lists.postgresql.org; Mon, 20 Nov 2023 10:46:41 +0000 Content-Type: multipart/alternative; boundary="------------kK9S0liU42uOKvdBJAzhQXXH" Message-ID: Date: Mon, 20 Nov 2023 12:46:34 +0200 MIME-Version: 1.0 Subject: Re: pgBackRest on old installation Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------kK9S0liU42uOKvdBJAzhQXXH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/20/23 12:31, KK CHN wrote: > list, > > I am trying pgBackRest on an RHEL 7.6 and old EDB 10 database cluster( > a legacy application.) > > I have installed pgbackrest through  package install on RHEL7.6 > But unable to get the basic stanza-creation working It throws an error. > > > * /etc/pgbackrest.conf  as follows..* > ################################################ > [demo] > pg1-path=/app/edb/as10/data > pg1-port = 5444 > pg1-socket-path=/tmp > > [global] > repo1-cipher-pass=sUAeceWoDffSz9Q/d8sWREHe+wte3uOO9lggn5/5mTkQEempvBxQk5UbxsrDzHbw > > repo1-cipher-type=aes-256-cbc > repo1-path=/var/lib/pgbackrest > repo1-retention-full=2 > backup-user=postgres > > > [global:archive-push] > compress-level=3 > ##################################################### > > > > [root@dbs ~]# pgbackrest version > pgBackRest 2.48 > [root@dbs ~]# > ##################################################### > > *Postgres conf as follows... * > > listen_addresses = '*' > port = 5444 > unix_socket_directories = '/tmp' > > archive_command = 'pgbackrest --stanza=demo archive-push %p' > archive_mode = on > log_filename = 'postgresql.log' > max_wal_senders = 3 > wal_level = replica > > ############################################# > > > *ERROR  Getting as follows ..    What went wrong here ??* > > >              [root@dbs ~]# sudo -u postgres pgbackrest --stanza=demo > --log-level-console=info stanza-create > 2023-11-20 21:04:05.223 P00   INFO: stanza-create command begin 2.48: > --exec-id=29527-bf5e2f80 --log-level-console=info > --pg1-path=/app/edb/as10/data --pg1-port=5444 --pg1-socket-path=/tmp > --repo1-cipher-pass= --repo1-cipher-type=aes-256-cbc > --repo1-path=/var/lib/pgbackrest --stanza=demo > WARN: unable to check pg1: [DbConnectError] unable to connect to > 'dbname='postgres' port=5444 host='/tmp'': connection to server on > socket "/tmp/.s.PGSQL.5444" failed: fe_sendauth: no password supplied > ERROR: [056]: unable to find primary cluster - cannot proceed >        HINT: are all available clusters in recovery? > 2023-11-20 21:04:05.224 P00   INFO: stanza-create command end: aborted > with exception [056] > [root@dbs ~]# > > It complains about the password.  I followed the below tutorial link, > but no mention of password (Where to supply password, what parameter > where ?) setting here ==> https://pgbackrest.org/user-guide-rhel.html This is about the user connecting to the db, in general, pgbackrest has to connect like any other app/user. So, change your .pgpass to contain smth like the below on the top of the file : /tmp:5444:*:postgres:your_whatever_pgsql_password and retry > > > Any hints welcome..  What am I missing here ?? > > Best, > Krishane > > > > > > > --------------kK9S0liU42uOKvdBJAzhQXXH Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 11/20/23 12:31, KK CHN wrote:
list,

I am trying pgBackRest on an RHEL 7.6 and old EDB 10 database cluster( a legacy application.)

I have installed pgbackrest through  package install on RHEL7.6
But unable to get the basic stanza-creation working It throws an error.


 /etc/pgbackrest.conf  as follows..
################################################
[demo]
pg1-path=/app/edb/as10/data
pg1-port = 5444
pg1-socket-path=/tmp

[global]
repo1-cipher-pass=sUAeceWoDffSz9Q/d8sWREHe+wte3uOO9lggn5/5mTkQEempvBxQk5UbxsrDzHbw

repo1-cipher-type=aes-256-cbc
repo1-path=/var/lib/pgbackrest
repo1-retention-full=2
backup-user=postgres


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



[root@dbs ~]# pgbackrest version
pgBackRest 2.48
[root@dbs ~]#
#####################################################

Postgres conf as follows...

listen_addresses = '*'        
port = 5444
unix_socket_directories = '/tmp'

archive_command = 'pgbackrest --stanza=demo archive-push %p'
archive_mode = on
log_filename = 'postgresql.log'
max_wal_senders = 3
wal_level = replica

#############################################


ERROR  Getting as follows ..    What went wrong here ??


             [root@dbs ~]# sudo -u postgres pgbackrest --stanza=demo --log-level-console=info stanza-create
2023-11-20 21:04:05.223 P00   INFO: stanza-create command begin 2.48: --exec-id=29527-bf5e2f80 --log-level-console=info --pg1-path=/app/edb/as10/data --pg1-port=5444 --pg1-socket-path=/tmp --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo
WARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname='postgres' port=5444 host='/tmp'': connection to server on socket "/tmp/.s.PGSQL.5444" failed: fe_sendauth: no password supplied
ERROR: [056]: unable to find primary cluster - cannot proceed
       HINT: are all available clusters in recovery?
2023-11-20 21:04:05.224 P00   INFO: stanza-create command end: aborted with exception [056]
[root@dbs ~]#

It complains about the password.  I followed the below tutorial link, but no mention of password (Where to supply password, what parameter where ?) setting here ==> https://pgbackrest.org/user-guide-rhel.html

This is about the user connecting to the db, in general, pgbackrest has to connect like any other app/user. So, change your .pgpass to contain smth like the below on the top of the file :

/tmp:5444:*:postgres:your_whatever_pgsql_password

and retry



Any hints welcome..  What am I missing here ??

Best,
Krishane







--------------kK9S0liU42uOKvdBJAzhQXXH--