Thread: Pgbackrest specifying the default DB necessary/correct way ?

Pgbackrest specifying the default DB necessary/correct way ?

From
KK CHN
Date:
List,  

I have configured the pgbackrest on a live DB server  and  a Repo Server. ( EPAS 16, RHEL 9.4 and Pgbackrest 2.52.1 )

On DB Server I have
##############################
[root@db1 ~]# cd
[root@db1 ~]# cat /etc/pgbackrest/pgbackrest.conf
[Demo_Repo]
pg1-path=/data/edb/as16/data
pg1-port=5444
pg1-user=enterprisedb
pg-version-force=16
pg1-database=edb                ##   Query 1. 

[global]
repo1-host=10.255.0.40
repo1-host-user=postgres
archive-async=y
spool-path=/var/spool/pgbackrest
log-level-console=info
log-level-file=debug
delta=y

[global:archive-get]
process-max=2

[global:archive-push]
process-max=4
##############################################

## Query 1:  

  In this DB server    I have other databases  than the default  "edb" database.     Specifying the above line as    pg1-database=edb   // I am not sure this line is necessary  or not ?

( I am just learning and exploring PgbackRest)  found online some reference configurations so using like this )

 pg1-database=edb // specifying like this, will it block other databases  on this server to get backed up ?   IF yes how can I overcome this ?

I want all databases on this server to be backed up to the remote repository. 


It is a production server and I can't perform a trial and error method here to understand how it works. 


Please shed some light on this .


Thanks ,
Krishane


Re: Pgbackrest specifying the default DB necessary/correct way ?

From
Greg Sabino Mullane
Date:
On Wed, Aug 28, 2024 at 1:39 AM KK CHN <kkchn.in@gmail.com> wrote:
In this DB server    I have other databases  than the default  "edb" database.     Specifying the above line as    pg1-database=edb   // I am not sure this line is necessary  or not ?

The pgbackrest process needs to connect to the database, which means it needs a user and database. You need this variable if you do not have the default database, "postgres". If you have a database named postgres, you can leave this out. Otherwise, yes, it is necessary.

 pg1-database=edb // specifying like this, will it block other databases  on this server to get backed up ?   IF yes how can I overcome this ?

pgBackRest works on a cluster level, so *all* the databases are backed up. Indeed, it is not possible to only backup some of the databases. It's the whole cluster.

 ( I am just learning and exploring PgbackRest)  found online some reference configurations so using like this )

Probably best to stick to the official docs; this section in particular is worth a read:


Cheers,
Greg


Very helpful. 

On Wed, Aug 28, 2024 at 5:51 PM Greg Sabino Mullane <htamfids@gmail.com> wrote:
On Wed, Aug 28, 2024 at 1:39 AM KK CHN <kkchn.in@gmail.com> wrote:
In this DB server    I have other databases  than the default  "edb" database.     Specifying the above line as    pg1-database=edb   // I am not sure this line is necessary  or not ?

The pgbackrest process needs to connect to the database, which means it needs a user and database. You need this variable if you do not have the default database, "postgres". If you have a database named postgres, you can leave this out. Otherwise, yes, it is necessary.

 pg1-database=edb // specifying like this, will it block other databases  on this server to get backed up ?   IF yes how can I overcome this ?

pgBackRest works on a cluster level, so *all* the databases are backed up. Indeed, it is not possible to only backup some of the databases. It's the whole cluster.

 ( I am just learning and exploring PgbackRest)  found online some reference configurations so using like this )

Probably best to stick to the official docs; this section in particular is worth a read:


Cheers,
Greg