RE: Barman

From: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: RE: Barman
Date: 2019-11-01 09:42:50
Message-ID: MN2PR01MB58549A888A195BDB4E4793EB9B620@MN2PR01MB5854.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

Thanks Tomas for your inputs. Suppose, if we have database in TB's with OLTP applications then what will be suitable backup strategy.

-----Original Message-----
From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Sent: Friday, November 1, 2019 12:27 AM
To: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org; pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Barman

On Thu, Oct 31, 2019 at 05:29:34PM +0000, Daulat Ram wrote:
>Hi All,
>
>We have configured postgres 11.2 in streaming replication (primary &
>Standby) on docker and I am looking to initiate the Postgres backup
>using barman. As I know there are few options for taking backup using
>barman.
>
>RSYNC backup
>Incremental Backups
>Streaming Backup with continuous WAL streaming Centralized and
>Catalogued Backups
>
>Which is the best option for backup using barman? So that we can keep
>the database safe in case of disaster? I feel the Incremental Backups
>are most useful to perform the PITR but I want to know the experts
>suggestions.
>

You're mixing a number of topics, here. Firstly, all backups done by barman are centralized and catalogued, that's pretty much one of the main purposes of barman.

When it comes to backup methods, there are two basic methods. rsync and postgres (which means pg_basebackup). This is about creating the initial base backup. Both methods then can replicate WAL by either streaming or archive_command.

So first you need to decide whether to use rsync and pg_basebackup, where rsync allows advanced features like incremental backup, parallel backup and deduplication.

Then you need to decide whether to use archive_command or streaming (i.e. pg_receivexlog).

The "right" backup method very much depends on the size of your database, activity, and so on. By default you should probably go with the default option, described as "scenario 1" in the barman docs, i.e.
pg_basebackup (backup_method = postgres) and WAL streaming.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

  • Re: Barman at 2019-10-31 18:56:46 from Tomas Vondra

Browse pgsql-general by date

  From Date Subject
Next Message M Tarkeshwar Rao 2019-11-01 12:44:31 Getting following error in using cursor to fetch the records from a large table in c language(current transaction is aborted, commands ignored until end of transaction block)
Previous Message M Tarkeshwar Rao 2019-11-01 06:25:54 RE: Getting following error in using cursor to fetch the records from a large table in c language

Browse pgsql-performance by date

  From Date Subject
Next Message David Wheeler 2019-11-04 03:04:45 Slow planning, fast execution for particular 3-table query
Previous Message Tomas Vondra 2019-10-31 18:56:46 Re: Barman