pgbackrest: backup from standby

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux