pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpgbackrest Help Required
3+ messages / 2 participants
[nested] [flat]
* pgbackrest Help Required
@ 2022-09-22 06:08 Inzamam Shafiq <inzamam.shafiq@hotmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Inzamam Shafiq @ 2022-09-22 06:08 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi Folks,
Hope you are doing well.
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.
Thanks.
Regards,
Inzamam Shafiq
Sr. DBA
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgbackrest Help Required
@ 2022-09-27 15:39 Stephen Frost <sfrost@snowman.net>
parent: Inzamam Shafiq <inzamam.shafiq@hotmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Frost @ 2022-09-27 15:39 UTC (permalink / raw)
To: Inzamam Shafiq <inzamam.shafiq@hotmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgbackrest Help Required
@ 2022-09-28 06:52 Inzamam Shafiq <inzamam.shafiq@hotmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Inzamam Shafiq @ 2022-09-28 06:52 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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
* Configure Standby cluster for pgbackrest and check backup info
* If standby is having replication issues, then --delta restore using pgbackrest
* 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-09-28 06:52 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 06:08 pgbackrest Help Required Inzamam Shafiq <inzamam.shafiq@hotmail.com>
2022-09-27 15:39 ` Stephen Frost <sfrost@snowman.net>
2022-09-28 06:52 Re: pgbackrest Help Required Inzamam Shafiq <inzamam.shafiq@hotmail.com>
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