# Pgbackrest another postgresql servers with same backup mchine

**URL:** <https://forums.percona.com/t/pgbackrest-another-postgresql-servers-with-same-backup-mchine/38670>\
**Category:** PostgreSQL\
**Tags:** postgresql\
**Created:** [July 14, 2025, 11:52am UTC](https://forums.percona.com/t/pgbackrest-another-postgresql-servers-with-same-backup-mchine/38670 "2025-07-14T11:52:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![esqin\_ceferov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/esqin_ceferov/32/21483_2.png) [@esqin\_ceferov](https://forums.percona.com/u/esqin_ceferov)\
**Post date:** [July 14, 2025, 11:52am UTC](https://forums.percona.com/t/pgbackrest-another-postgresql-servers-with-same-backup-mchine/38670/1 "2025-07-14T11:52:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Agustin\_G](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/agustin_g/32/14111_2.png) [@Agustin\_G](https://forums.percona.com/u/Agustin_G)\
**Post date:** [August 19, 2025, 1:27pm UTC](https://forums.percona.com/t/pgbackrest-another-postgresql-servers-with-same-backup-mchine/38670/2 "2025-08-19T13:27:57Z")

</div>

Hi @esqin_ceferov,

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

> **[pgBackRest - Command Reference](https://pgbackrest.org/command.html)**
>
> The pgBackRest Command Reference details all commands and options.

> **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.
> 
> ```auto
> example: --stanza=main
> 
> ```

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

> **[pgBackRest User Guide - Debian & Ubuntu](https://pgbackrest.org/user-guide.html#repo-host)**
>
> The pgBackRest User Guide demonstrates how to quickly and easily setup pgBackRest for your PostgreSQL database. Step-by-step instructions lead the user through all the important features of the fastest, most reliable PostgreSQL backup and restore...

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

```auto
[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.
