pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpgBackRest on old installation
5+ messages / 3 participants
[nested] [flat]
* pgBackRest on old installation
@ 2023-11-20 10:31 KK CHN <kkchn.in@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: KK CHN @ 2023-11-20 10:31 UTC (permalink / raw)
To: pgsql-general
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
Any hints welcome.. What am I missing here ??
Best,
Krishane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgBackRest on old installation
@ 2023-11-20 10:46 Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
parent: KK CHN <kkchn.in@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Achilleas Mantzios - cloud @ 2023-11-20 10:46 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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
>
>
>
>
>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgBackRest on old installation
@ 2023-11-21 06:36 KK CHN <kkchn.in@gmail.com>
parent: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
0 siblings, 1 reply; 5+ messages in thread
From: KK CHN @ 2023-11-21 06:36 UTC (permalink / raw)
To: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>; +Cc: pgsql-general@lists.postgresql.org
Thank you. Its worked out well. But a basic doubt ? is storing the DB
superuser password in .pgpass is advisable ? What other options do we have ?
#su postgres
bash-4.2$ cd
bash-4.2$ cat .pgpass
*:*:*:postgres:your_password
bash-4.2$
On Mon, Nov 20, 2023 at 4:16 PM Achilleas Mantzios - cloud <
a.mantzios@cloud.gatewaynet.com> wrote:
>
> 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
>
>
>
>
>
>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgBackRest on old installation
@ 2023-11-21 11:59 Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
parent: KK CHN <kkchn.in@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Achilleas Mantzios - cloud @ 2023-11-21 11:59 UTC (permalink / raw)
To: KK CHN <kkchn.in@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On 11/21/23 08:36, KK CHN wrote:
> Thank you. Its worked out well. But a basic doubt ? is storing the DB
> superuser password in .pgpass is advisable ? What other options do we
> have ?
> #su postgres
> bash-4.2$ cd
>
> bash-4.2$ cat .pgpass
> *:*:*:postgres:your_password
> bash-4.2$
root has access to any file, but if you give password on the command
line or env variable then you give this info to all users in the system.
>
>
> On Mon, Nov 20, 2023 at 4:16 PM Achilleas Mantzios - cloud
> <a.mantzios@cloud.gatewaynet.com> wrote:
>
>
> 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
>>
>>
>>
>>
>>
>>
>>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgBackRest on old installation
@ 2023-11-21 12:58 Ray O'Donnell <ray@rodonnell.ie>
parent: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
0 siblings, 0 replies; 5+ messages in thread
From: Ray O'Donnell @ 2023-11-21 12:58 UTC (permalink / raw)
To: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>; KK CHN <kkchn.in@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On 21/11/2023 11:59, Achilleas Mantzios - cloud wrote:
> On 11/21/23 08:36, KK CHN wrote:
>
>> Thank you. Its worked out well. But a basic doubt ? is storing the DB
>> superuser password in .pgpass is advisable ? What other options do we
>> have ?
The .pgpass file is stored in the user's home directory, and from memory
I think it won't get used at all if the permissions allow anyone other
than the user to read it, so it's safer than it sounds!
Ray.
--
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2023-11-21 12:58 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 10:31 pgBackRest on old installation KK CHN <kkchn.in@gmail.com>
2023-11-20 10:46 ` Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-21 06:36 ` KK CHN <kkchn.in@gmail.com>
2023-11-21 11:59 ` Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-21 12:58 ` Ray O'Donnell <ray@rodonnell.ie>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox