pgbackrest: backup from standby

Поиск
Список
Период
Сортировка
От Craig James
Тема pgbackrest: backup from standby
Дата
Msg-id CAFwQ8rcyq5ymqsqEV0VSyqeVZvhEh-qmU2+fK3EXA0C8uHNWzg@mail.gmail.com
обсуждение исходный текст
Ответы Re: pgbackrest: backup from standby  (Craig James <cjames@emolecules.com>)
Re: pgbackrest: backup from standby  (David Steele <david@pgmasters.net>)
Список pgsql-admin
The pgbackrest documentation has a section on backing up from a standby, but I'm having trouble figuring it out. I think it's just a terminology problem: I can't figure out which configuration directives go on which server.

To begin with, I already have streaming replication running:

Primary server (live database): "radon"

[emolecules]
  db-path=/var/lib/postgresql/9.6/main

[global]
  repo-path=/pg_archive/pgbackrest
  retention-full=10
  backup-user=postgres
  log-level-file=detail

Hot-standby server: "standby"

[emolecules]
  db-path=/var/lib/postgresql/9.6/main
  recovery-option=standby_mode=on

 [global]
  backup-host=radon.emolecules.com
  backup-user=postgres

The standby server is on Amazon AWS, and I want to set up a backup Amazon S3 archive that gets its snapshot and WAL files from the standby in order to save bandwidth costs from the primary (don't want to copy the data twice).

Note that the primary is also archived to a local NFS disk. I want to keep that going, too, but create a second archive on S3. (The reason for this is that we're migrating from our own hardware to AWS, and during the transition need both systems fully functional.)

There are sections in the user guide on Backup from a Standby and on S3 Support, but I can't sort out how to combine them. Apparently I need to define pg1-host/pg1-path, and pg2-host/pg2-path, then a stanza for S3. But does all this go in the pgbackrest.conf of the primary ("radon" in my case), or on the standby, or somehow split across both?

Another question: if I modify these files, will the current standby replica keep streaming properly? That is, can I add the S3 repository to the current primary/standby pair without having to start over?

Thanks!
Craig

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: temp_file_limit parameter ignored?
Следующее
От: Craig James
Дата:
Сообщение: Re: pgbackrest: backup from standby