public inbox for [email protected]
help / color / mirror / Atom feedFrom: Greg Sabino Mullane <[email protected]>
To: Radu Radutiu <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Pgbackrest setup for two sites with limited bandwidth
Date: Mon, 10 Nov 2025 10:33:20 -0500
Message-ID: <CAKAnmmKsgLmBOJQQouOFUHeEMjSCouK_dqx+xhdUNZ58UsUq3w@mail.gmail.com> (raw)
In-Reply-To: <CAG4TxrgqofFj1_LGT29DUwzn_LFLJO7MUO5sCWk620ctin00jg@mail.gmail.com>
References: <CAG4TxrgqofFj1_LGT29DUwzn_LFLJO7MUO5sCWk620ctin00jg@mail.gmail.com>
What you are asking for is tricky, but possible. You can setup two repos,
one for each server. On the first server (in datacenter A), you have a
"normal" pgbackrest configuration, with an explicit backup-standby=n. pg1-*
points to the local server, pg2-* points to the replica. The repo is in
datacenter A.Backups run from PG server in datacenter A, to the backrest
repo in datacenter A. WAL is archived from A -> A
On datacenter B, you have a separate local repo, a different stanza name,
and within that stanza, you have backup-standby=y, pg1 pointing to the
local pg, pg2 pointing back to A. In the postgresql.conf, your
archive-command pushes to this second repo, and archive_mode is "always".
Backups run from the PG server in datacenter A, but 99% of the files are
actually copied from the replica in datacenter B, and goes to the backrest
server in datacenter B. WAL is archived from B -> B.
That's the basic idea. It falls apart rapidly if this second data center
ever fails over.
Cheers,
Greg
--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support
view thread (3+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Pgbackrest setup for two sites with limited bandwidth
In-Reply-To: <CAKAnmmKsgLmBOJQQouOFUHeEMjSCouK_dqx+xhdUNZ58UsUq3w@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox