From: David Steele <david@pgmasters.net>
To: Craig James <cjames@emolecules.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pgbackrest: backup from standby
Date: Wed, 22 Aug 2018 11:37:30 -0400
Message-ID: <404af85d-01ea-562a-0186-afef862696d2@pgmasters.net> (raw)
In-Reply-To: <CAFwQ8rf+9hO-NEyRfRLA1zVmvW0aHf5xp74J3NR76iV4tsQdmA@mail.gmail.com>
References: <CAFwQ8rcyq5ymqsqEV0VSyqeVZvhEh-qmU2+fK3EXA0C8uHNWzg@mail.gmail.com>
<d67a6a2a-5b8b-ee93-ea3f-464b8d8aa6ce@pgmasters.net>
<CAFwQ8rf+9hO-NEyRfRLA1zVmvW0aHf5xp74J3NR76iV4tsQdmA@mail.gmail.com>
On 8/20/18 9:42 PM, Craig James wrote:
>
> One possibility: Does pgbackrest support chained standby servers?
>
> primary ----> standby #1 ----> standby #2
This won't matter to pgBackRest and Postgres certainly supports it.
> If so, we could do this:
>
> 1. Set up standby #1 and #2 on AWS, but no S3 yet
> 2. Prepare config for S3, but don't deploy
> 3. Failover to standby #1, making it the primary
> 4. Start the S3 backup
Or combine my earlier plan with your plan to allow you to keep your repo
and have uninterrupted PITR:
Before the migration:
1) Stop backups
2) Sync the NFS repo to S3 using rsync/s3fs or aws cli
During the migration:
3) Failover to new AWS primary but leave archive_command disabled on new
primary (archive_command = false)
4) Resync the NFS repo to S3 to get new WAL segments
5) Enable archive command on AWS primary
6) Perform a new backup directly to S3 (just in case was mistake was
made syncing the repo)
Depending on your WAL volume you can add some syncs in there to reduce
the time when the new primary is not archiving, maybe after step #2 and
again before step #3.
This leaves you with your old backups and PITR capability while only
copying data local->S3 once.
Regards,
--
-David
david@pgmasters.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: david@pgmasters.net, cjames@emolecules.com
Subject: Re: pgbackrest: backup from standby
In-Reply-To: <404af85d-01ea-562a-0186-afef862696d2@pgmasters.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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