Pgbackrest another postgresql servers with same backup mchine

hello guys,i have postgres(3node,patroni)servers which i take backup with pgbackrest(bckupserver),now i set up new postgres(3node,patrtoni)and i want backup and restore this postgres with same backup machine,how to do it just dont any false affect another backuping

Hi @esqin_ceferov,

You can do this by defining and using a new Stanza for it. From the pgBackRest documentation manual:

2.2.11 Stanza Option (–stanza)

Defines the stanza.

A stanza is the configuration for a PostgreSQL database cluster that defines where it is located, how it will be backed up, archiving options, etc. Most db servers will only have one PostgreSQL database cluster and therefore one stanza, whereas backup servers will have a stanza for every database cluster that needs to be backed up.

It is tempting to name the stanza after the primary cluster but a better name describes the databases contained in the cluster. Because the stanza name will be used for the primary and all replicas it is more appropriate to choose a name that describes the actual function of the cluster, such as app or dw, rather than the local cluster name, such as main or prod.

example: --stanza=main

The online docs have an example of using a remote server dedicated for backups:

In that example, “[demo]” is the stanza used, so you can have others created for other environments. For instance:

[env1]
pg1-host=pg-env1-node1
pg1-path=/var/lib/postgresql/16/data

[env2]
pg1-host=pg-env2-node1
pg1-path=/var/lib/postgresql/17/data

[global]
...

Let me know if this helped.