pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
configure multiple repository path in pgbackrest
5+ messages / 3 participants
[nested] [flat]

* configure multiple repository path in pgbackrest
@ 2019-06-05 14:48 Pavan Kumar <pavan.dba27@gmail.com>
  2019-06-05 15:09 ` Re: configure multiple repository path in pgbackrest Ron <ronljohnsonjr@gmail.com>
  2019-06-05 19:49 ` Re: configure multiple repository path in pgbackrest Stephen Frost <sfrost@snowman.net>
  0 siblings, 2 replies; 5+ messages in thread

From: Pavan Kumar @ 2019-06-05 14:48 UTC (permalink / raw)
  To: pgsql-general General <pgsql-general@postgresql.org>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

Hello Experts,

Is it possible to configure multiple backup repositories in pgbackrest tool
in one server?
I am getting few issues with that.


-- 



*Regards,#!  Pavan Kumar----------------------------------------------*-
*Sr. Database Administrator..!*
*NEXT GENERATION PROFESSIONALS, LLC*
*Cell    #  267-799-3182 #  pavan.dba27 (Gtalk)  *
*India   # 9000459083*

*Take Risks; if you win, you will be very happy. If you lose you will be
Wise  *

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: configure multiple repository path in pgbackrest
  2019-06-05 14:48 configure multiple repository path in pgbackrest Pavan Kumar <pavan.dba27@gmail.com>
@ 2019-06-05 15:09 ` Ron <ronljohnsonjr@gmail.com>
  2019-06-05 19:43   ` Re: configure multiple repository path in pgbackrest Pavan Kumar <pavan.dba27@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Ron @ 2019-06-05 15:09 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 6/5/19 9:48 AM, Pavan Kumar wrote:
> Hello Experts,
>
> Is it possible to configure multiple backup repositories in pgbackrest 
> tool in one server?
> I am getting few issues with that.

https://pgbackrest.org/command.html#command-backup

3.4.9
Repository Path Option (--repo-path)
Path where backups and archive are stored.
The repository is wherepgBackReststores backups and archives WAL segments.

It may be difficult to estimate in advance how much space you'll need. The 
best thing to do is take some backups then record the size of different 
types of backups (full/incr/diff) and measure the amount of WAL generated 
per day. This will give you a general idea of how much space you'll need, 
though of course requirements will likely change over time as your database 
evolves.

default: /var/lib/pgbackrest
example: --repo1-path=/backup/db/backrest


Since there's a --repo*1*-path, then presumably there can also be a 
--repo2-path.

You'd presumably associate a database with repo2 by using --pg2-path

https://pgbackrest.org/command.html#command-archive-get

2.5
Stanza Options
2.5.1
PostgreSQL Path Option (--pg-path)
PostgreSQLdata directory.
This should be the same as thedata_directorysetting inpostgresql.conf. Even 
though this value can be read frompostgresql.conforPostgreSQLit is prudent 
to set it in case those resources are not available during a restore or 
offline backup scenario.

Thepg-pathoption is tested against the value reported byPostgreSQLon every 
online backup so it should always be current.

example: --pg1-path=/data/db

Deprecated Name: db-path

Of course, this might not work, so you'll have to try it yourself.

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: configure multiple repository path in pgbackrest
  2019-06-05 14:48 configure multiple repository path in pgbackrest Pavan Kumar <pavan.dba27@gmail.com>
  2019-06-05 15:09 ` Re: configure multiple repository path in pgbackrest Ron <ronljohnsonjr@gmail.com>
@ 2019-06-05 19:43   ` Pavan Kumar <pavan.dba27@gmail.com>
  2019-06-05 19:53     ` Re: configure multiple repository path in pgbackrest Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Pavan Kumar @ 2019-06-05 19:43 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

Hello Ron,

Thank you so much for quick response.

here is my configuration.

[postgres@oralnx v2demo4448]$cat /etc/pgbackrest/pgbackrest.conf
[v1demo]
pg1-path=/oradbaudit/pg_data_dir
pg1-port=5400
[v2demo]
pg1-path=/oratrace/11_2_data
pg1-port=4448

# Backup repository configuration
[global]
repo1-path=/orabackup/WORM/PGBACKUP/visdemo5400
repo1-retention-full=2
repo2-path=/orabackup/WORM/PGBACKUP/v2demo4448
repo2-retention-full=2

[postgres@oralnx v2demo4448]$

[postgres@oralnx v2demo4448]$ pgbackrest --stanza=v2demo
--log-path=/oratrace/pg_alert_log
--repo-path=/orabackup/WORM/PGBACKUP/v2demo4448 --log-level-console=detail
--log-level-file=detail stanza-create
WARN: configuration file contains invalid option 'repo2-path'   >>>>>>>>
*************
WARN: configuration file contains invalid option 'repo2-retention-full'
>>>>>> *********
2019-06-05 19:35:05.351 P00   INFO: stanza-create command begin 2.14:
--log-level-console=detail --log-level-file=detail
--log-path=/oratrace/pg_alert_log --pg1-path=/oratrace/11_2_data
--pg1-port=4448 --repo1-path=/orabackup/WORM/PGBACKUP/v2demo4448
--stanza=v2demo  >>>>> ***** for some reason it took repo1- path
2019-06-05 19:35:06.674 P00   INFO: stanza-create command end: completed
successfully (1324ms)
[postgres@oralnx v2demo4448]$

It got errored out when I check stanza

[postgres@oralnx v2demo4448]$pgbackrest --stanza=v2demo
--log-level-console=info check
WARN: configuration file contains invalid option 'repo2-path'
WARN: configuration file contains invalid option 'repo2-retention-full'
2019-06-05 19:36:31.188 P00   INFO: check command begin 2.14:
--log-level-console=info --pg1-path=/oratrace/11_2_data --pg1-port=4448
--repo1-path=/orabackup/WORM/PGBACKUP/visdemo5400 --stanza=v2demo  >>>> ***
why it is not taking repo2-path
ERROR [055]: : unable to open
/orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/backup.info or
/orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/backup.info.copy
ERROR [055]: : /orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/
backup.info does not exist and is required to perform a backup.
HINT: has a stanza-create been performed?
ERROR [055]: : /orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/
backup.info does not exist and is required to perform a backup.
HINT: has a stanza-create been performed?
2019-06-05 19:36:32.826 P00   INFO: check command end: aborted with
exception [055]
[postgres@oralnx v2demo4448]$
here is my configuration



On Wed, Jun 5, 2019 at 10:09 AM Ron <ronljohnsonjr@gmail.com> wrote:

>
>
> On 6/5/19 9:48 AM, Pavan Kumar wrote:
>
> Hello Experts,
>
> Is it possible to configure multiple backup repositories in pgbackrest
> tool in one server?
> I am getting few issues with that.
>
>
> https://pgbackrest.org/command.html#command-backup
>
> 3.4.9
> Repository Path Option (--repo-path)
> Path where backups and archive are stored.
> The repository is where pgBackRest stores backups and archives WAL
> segments.
>
> It may be difficult to estimate in advance how much space you'll need. The
> best thing to do is take some backups then record the size of different
> types of backups (full/incr/diff) and measure the amount of WAL generated
> per day. This will give you a general idea of how much space you'll need,
> though of course requirements will likely change over time as your database
> evolves.
>
> default: /var/lib/pgbackrest
> example: --repo1-path=/backup/db/backrest
>
>
> Since there's a --repo*1*-path, then presumably there can also be a --repo
> 2-path.
>
> You'd presumably associate a database with repo2 by using --pg2-path
>
> https://pgbackrest.org/command.html#command-archive-get
>
> 2.5
> Stanza Options
> 2.5.1
> PostgreSQL Path Option (--pg-path)
> PostgreSQL data directory.
> This should be the same as the data_directory setting in postgresql.conf.
> Even though this value can be read from postgresql.conf or PostgreSQL it
> is prudent to set it in case those resources are not available during a
> restore or offline backup scenario.
>
> The pg-path option is tested against the value reported by PostgreSQL on
> every online backup so it should always be current.
>
> example: --pg1-path=/data/db
>
> Deprecated Name: db-path
>
> Of course, this might not work, so you'll have to try it yourself.
>
> --
> Angular momentum makes the world go 'round.
>


-- 



*Regards,#!  Pavan Kumar----------------------------------------------*-
*Sr. Database Administrator..!*
*NEXT GENERATION PROFESSIONALS, LLC*
*Cell    #  267-799-3182 #  pavan.dba27 (Gtalk)  *
*India   # 9000459083*

*Take Risks; if you win, you will be very happy. If you lose you will be
Wise  *

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: configure multiple repository path in pgbackrest
  2019-06-05 14:48 configure multiple repository path in pgbackrest Pavan Kumar <pavan.dba27@gmail.com>
  2019-06-05 15:09 ` Re: configure multiple repository path in pgbackrest Ron <ronljohnsonjr@gmail.com>
  2019-06-05 19:43   ` Re: configure multiple repository path in pgbackrest Pavan Kumar <pavan.dba27@gmail.com>
@ 2019-06-05 19:53     ` Ron <ronljohnsonjr@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Ron @ 2019-06-05 19:53 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

You set pg1-path and pg1-port in both v1demo and v2demo. Shouldn't v2demo 
use pg2-path and pg2-port?

On 6/5/19 2:43 PM, Pavan Kumar wrote:
> Hello Ron,
>
> Thank you so much for quick response.
>
> here is my configuration.
>
> [postgres@oralnx v2demo4448]$cat /etc/pgbackrest/pgbackrest.conf
> [v1demo]
> pg1-path=/oradbaudit/pg_data_dir
> pg1-port=5400
> [v2demo]
> pg1-path=/oratrace/11_2_data
> pg1-port=4448
>
> # Backup repository configuration
> [global]
> repo1-path=/orabackup/WORM/PGBACKUP/visdemo5400
> repo1-retention-full=2
> repo2-path=/orabackup/WORM/PGBACKUP/v2demo4448
> repo2-retention-full=2
>
> [postgres@oralnx v2demo4448]$
>
> [postgres@oralnx v2demo4448]$ pgbackrest --stanza=v2demo 
> --log-path=/oratrace/pg_alert_log 
> --repo-path=/orabackup/WORM/PGBACKUP/v2demo4448 --log-level-console=detail 
> --log-level-file=detail stanza-create
> WARN: configuration file contains invalid option 'repo2-path'   >>>>>>>> 
> *************
> WARN: configuration file contains invalid option 'repo2-retention-full'  
> >>>>>> *********
> 2019-06-05 19:35:05.351 P00   INFO: stanza-create command begin 2.14: 
> --log-level-console=detail --log-level-file=detail 
> --log-path=/oratrace/pg_alert_log --pg1-path=/oratrace/11_2_data 
> --pg1-port=4448 --repo1-path=/orabackup/WORM/PGBACKUP/v2demo4448 
> --stanza=v2demo  >>>>> ***** for some reason it took repo1- path
> 2019-06-05 19:35:06.674 P00   INFO: stanza-create command end: completed 
> successfully (1324ms)
> [postgres@oralnx v2demo4448]$
>
> It got errored out when I check stanza
>
> [postgres@oralnx v2demo4448]$pgbackrest --stanza=v2demo 
> --log-level-console=info check
> WARN: configuration file contains invalid option 'repo2-path'
> WARN: configuration file contains invalid option 'repo2-retention-full'
> 2019-06-05 19:36:31.188 P00   INFO: check command begin 2.14: 
> --log-level-console=info --pg1-path=/oratrace/11_2_data --pg1-port=4448 
> --repo1-path=/orabackup/WORM/PGBACKUP/visdemo5400 --stanza=v2demo  >>>> 
> *** why it is not taking repo2-path
> ERROR [055]: : unable to open 
> /orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/backup.info 
> <http://backup.info; or 
> /orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/backup.info.copy
> ERROR [055]: : 
> /orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/backup.info 
> <http://backup.info; does not exist and is required to perform a backup.
> HINT: has a stanza-create been performed?
> ERROR [055]: : 
> /orabackup/WORM/PGBACKUP/visdemo5400/backup/v2demo/backup.info 
> <http://backup.info; does not exist and is required to perform a backup.
> HINT: has a stanza-create been performed?
> 2019-06-05 19:36:32.826 P00   INFO: check command end: aborted with 
> exception [055]
> [postgres@oralnx v2demo4448]$
> here is my configuration
>
>
>
> On Wed, Jun 5, 2019 at 10:09 AM Ron <ronljohnsonjr@gmail.com 
> <mailto:ronljohnsonjr@gmail.com>> wrote:
>
>
>
>     On 6/5/19 9:48 AM, Pavan Kumar wrote:
>>     Hello Experts,
>>
>>     Is it possible to configure multiple backup repositories in
>>     pgbackrest tool in one server?
>>     I am getting few issues with that.
>
>     https://pgbackrest.org/command.html#command-backup
>
>     3.4.9
>     Repository Path Option (--repo-path)
>     Path where backups and archive are stored.
>     The repository is wherepgBackReststores backups and archives WAL segments.
>
>     It may be difficult to estimate in advance how much space you'll need.
>     The best thing to do is take some backups then record the size of
>     different types of backups (full/incr/diff) and measure the amount of
>     WAL generated per day. This will give you a general idea of how much
>     space you'll need, though of course requirements will likely change
>     over time as your database evolves.
>
>     default: /var/lib/pgbackrest
>     example: --repo1-path=/backup/db/backrest
>
>
>     Since there's a --repo*1*-path, then presumably there can also be a
>     --repo2-path.
>
>     You'd presumably associate a database with repo2 by using --pg2-path
>
>     https://pgbackrest.org/command.html#command-archive-get
>
>     2.5
>     Stanza Options
>     2.5.1
>     PostgreSQL Path Option (--pg-path)
>     PostgreSQLdata directory.
>     This should be the same as thedata_directorysetting inpostgresql.conf.
>     Even though this value can be read frompostgresql.conforPostgreSQLit
>     is prudent to set it in case those resources are not available during
>     a restore or offline backup scenario.
>
>     Thepg-pathoption is tested against the value reported byPostgreSQLon
>     every online backup so it should always be current.
>
>     example: --pg1-path=/data/db
>
>     Deprecated Name: db-path
>
>     Of course, this might not work, so you'll have to try it yourself.
>
>     -- 
>     Angular momentum makes the world go 'round.
>
>
>
> -- 
> *Regards,
>
> #!  Pavan Kumar
> ----------------------------------------------*-
> *Sr. Database Administrator..!*
> *NEXT GENERATION PROFESSIONALS, LLC*
> *Cell    #  267-799-3182 #  pavan.dba27 (Gtalk) *
> *India   # 9000459083*
>
>     *Take Risks; if you win, you will be very happy. If you lose you will
>     be Wise *
>

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: configure multiple repository path in pgbackrest
  2019-06-05 14:48 configure multiple repository path in pgbackrest Pavan Kumar <pavan.dba27@gmail.com>
@ 2019-06-05 19:49 ` Stephen Frost <sfrost@snowman.net>
  1 sibling, 0 replies; 5+ messages in thread

From: Stephen Frost @ 2019-06-05 19:49 UTC (permalink / raw)
  To: Pavan Kumar <pavan.dba27@gmail.com>; +Cc: pgsql-general General <pgsql-general@postgresql.org>

Greetings,

(dropping -admin, please do NOT send to multiple mailing lists- just
pick one)

* Pavan Kumar (pavan.dba27@gmail.com) wrote:
> Is it possible to configure multiple backup repositories in pgbackrest tool
> in one server?

While we have considered adding support for that, it's not there today.
Instead, you can pretty easily just have multiple pgbackrest.conf files
and specify which you want used on the command-line.

Documentation is here:

https://pgbackrest.org/configuration.html#section-repository

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2019-06-05 19:53 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05 14:48 configure multiple repository path in pgbackrest Pavan Kumar <pavan.dba27@gmail.com>
2019-06-05 15:09 ` Ron <ronljohnsonjr@gmail.com>
2019-06-05 19:43   ` Pavan Kumar <pavan.dba27@gmail.com>
2019-06-05 19:53     ` Ron <ronljohnsonjr@gmail.com>
2019-06-05 19:49 ` Stephen Frost <sfrost@snowman.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox