Re: pgbackrest Help Required - Mailing list pgsql-general
From | Inzamam Shafiq |
---|---|
Subject | Re: pgbackrest Help Required |
Date | |
Msg-id | AM9P251MB03300A390E6888F410F752D698549@AM9P251MB0330.EURP251.PROD.OUTLOOK.COM Whole thread Raw |
In response to | pgbackrest Help Required (Inzamam Shafiq <inzamam.shafiq@hotmail.com>) |
List | 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
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.
- Configure passwordless SSH connectivity between hosts
- Configure NFS for shared drive between hosts
- Stop Standby Cluster
- Prepare Primary node for pgbackrest and replication
- Configure pgbackrest to backup Primary node
- 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
- Test Streaming Replication
- Edit pgbackrest.conf on Standby Node for backup
- Perform backup from Standby
- 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
* 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 by date: