On 2/19/18 9:25 AM, Don Seiler wrote:
> On Mon, Feb 19, 2018 at 8:18 AM, David Steele <da...@pgmasters.net
> <mailto:da...@pgmasters.net>> wrote:
> It copies files that are not replicated from the primary so that a
> primary-style backup is created. Anything that is replicated (which is
> by far the bulk of the data) is copied from the standby.
> OK so all data files would be copied from standby. Can you give me an
> example of the types of files that need to be copied from primary?
Anything *not* in global (except pg_control), base, pg_tblspc,
pg_xact/pg_clog, and pg_multixact are copied from the primary.
For example, pg_stat is copied from the primary so these stats are
preserved on a standby backup.
pgBackRest uses all the same exclusions as pg_basebackup, so many
dirs/files are not copied at all: pg_dynshmem, pg_notify, pg_replslot,
pg_serial, pg_snapshots, pg_stat_tmp, pg_subtrans, etc.
Full list here
> it's best to archive from the primary so a replication
> failure does not affect your archiving.
> Understood, just not something I can change in production primary at the
> moment. Hence looking to see about a quick one-off backup from standby.
For a quick one-off, pg_basebackup is your friend.