Re: pgbackrest Help Required

Поиск
Список
Период
Сортировка
От Inzamam Shafiq
Тема Re: pgbackrest Help Required
Дата
Msg-id AM9P251MB03300A390E6888F410F752D698549@AM9P251MB0330.EURP251.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на pgbackrest Help Required  (Inzamam Shafiq <inzamam.shafiq@hotmail.com>)
Список pgsql-general
Hi Stephen,

Thanks for your response.

> Not sure what 'traditional zip method' means here, but if you've copied
the shell script out of the documentation, that's not a safe
configuration.

Conventional zip method means my archive_command and restore_command parameters are as follows,

archive_command = 'if test ! -d "/archives/"; then mkdir -p "/archives/"; fi; test ! -f "/archives/%f" && gzip < "%p" > "/archives/%f.gz"'

restore_command = 'gunzip < "/archives/%f".gz > "%p"'


> In configuration of pgbackrest, simply configure each of the PG hosts
and the repo and then set backup-standby=y.  You'll need to make sure
that the archive_command is set to pgbackrest, of course.  Having an
existing streaming replication setup is perfectly fine and pgbackrest
won't interfere with that.  You will want to set your restore command
to pgbackrest also though, in case streaming fails.

I have done configurations, I just need a confirmation whether I did it right or still there needs some improvement. it will be helpful if I can have a documentation where someone has primary and standby in place and he had configured pgbackrest without disturbing the replication. I have followed below steps, please have a look at them and suggest any imporvements if requried.

  1. Configure passwordless SSH connectivity between hosts 
  2. Configure NFS for shared drive between hosts 
  3. Stop Standby Cluster
  4. Prepare Primary node for pgbackrest and replication 
  5. Configure pgbackrest to backup Primary node 
  6. Setup Standby node for pgbackrest and resume replication  
    1. Configure Standby cluster for pgbackrest and check backup info 
    2. If standby is having replication issues, then --delta restore using pgbackrest 
    3. Check the replication 
  1. Test Streaming Replication 
  2. Edit pgbackrest.conf on Standby Node for backup 
  3. Perform backup from Standby 
  4. Test Steaming Replication again  

Regards,

Inzamam Shafiq
Sr. DBA


From: Stephen Frost
Sent: Tuesday, September 27, 2022 8:39 PM
To: Inzamam Shafiq
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pgbackrest Help Required

Greetings,

* Inzamam Shafiq (inzamam.shafiq@hotmail.com) wrote:
> I am in process of configuring pgbackrest, I have followed documents and configured backup from backup server. I have a setup of Primary and Hot Standby, when I configured pgbackrest the standby DB got un-synced and now I am unable to recover it, can anyone help or share a good document where we can implement pgbackrest where streaming replication is already in place using traditional pg_basebackup method?
>
> Note: I want to configure pgbackrest and to take backup from standby DB, however streaming replication is already there, where the archive and restore commands are configured using traditional zip method.

Not sure what 'traditional zip method' means here, but if you've copied
the shell script out of the documentation, that's not a safe
configuration.

In configuration of pgbackrest, simply configure each of the PG hosts
and the repo and then set backup-standby=y.  You'll need to make sure
that the archive_command is set to pgbackrest, of course.  Having an
existing streaming replication setup is perfectly fine and pgbackrest
won't interfere with that.  You will want to set your restore command
to pgbackrest also though, in case streaming fails.

Thanks,

Stephen

В списке pgsql-general по дате отправления:

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Limiting the operations that client-side code can perform upon its database backend's artifacts
Следующее
От: "Zwettler Markus (OIZ)"
Дата:
Сообщение: is there still a memory leak with hash joins in PG 12.11 ?