Re: pgbackrest: backup from standby

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: pgbackrest: backup from standby
Дата
Msg-id 404af85d-01ea-562a-0186-afef862696d2@pgmasters.net
обсуждение исходный текст
Ответ на Re: pgbackrest: backup from standby  (Craig James <cjames@emolecules.com>)
Ответы Re: pgbackrest: backup from standby
Список pgsql-admin
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


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

Предыдущее
От: Wim Bertels
Дата:
Сообщение: Re: Setting up SSL for postgre
Следующее
От: Craig James
Дата:
Сообщение: Re: pgbackrest: backup from standby