Any reason not to run Barman against a streaming replication slave?

1,088 views
Skip to first unread message

Collin Peters

unread,
Dec 19, 2012, 1:00:42 PM12/19/12
to pgba...@googlegroups.com
We have just setup a slave (will be evaluating repmgr 2 soon).  Wondering if there is any reason Barman couldn't be run off of the slave so that there is no additional load on the master

/Collin

Gabriele Bartolini

unread,
Dec 20, 2012, 12:54:26 PM12/20/12
to pgba...@googlegroups.com, Collin Peters
Hi Collin,

Il 19/12/12 19:00, Collin Peters ha scritto:
> We have just setup a slave (will be evaluating repmgr 2 soon).
> Wondering if there is any reason Barman couldn't be run off of the
> slave so that there is no additional load on the master
It is not currently supported, but it is definitely feasible and an idea
for future versions.

Ciao,
Gabriele

--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele....@2ndQuadrant.it | www.2ndQuadrant.it

Ervin Weber

unread,
Feb 2, 2013, 2:13:41 PM2/2/13
to pgba...@googlegroups.com

Hello everybody,
I will be bumping a bit old topic, but I would like to make checklist what would it take to allow Barman run most IO on hot_standby, not affecting master much.

pg_start_backup and pg_stop_backup would need to run on master. so configuration would need to allow second 'ssh_command' and 'conninfo' options. What else is needed? 

Best,
Ervin.

Blobster

unread,
Feb 26, 2013, 5:23:48 PM2/26/13
to pgba...@googlegroups.com
Hi everyone:
I too have a working hot standby setup and would like to add barman's archiving. Does anyone know if it's possible to have barman get the WAL files from the hot standby, either running on the slave itself or on another machine? I'd like to avoid sending the files from the remote server twice.
Is this feature being developed or is this all theoretical now?
Thanks,
Blobster

Pierre BOIZOT

unread,
Feb 26, 2013, 7:26:24 PM2/26/13
to pgba...@googlegroups.com

Hi blobster,
You can add archiving on the master without pb.
Slave do not generate archive.

Best regards.
Pierre

--
--
You received this message because you are subscribed to the "Barman for PostgreSQL" group.
To post to this group, send email to pgba...@googlegroups.com
To unsubscribe from this group, send email to
pgbarman+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pgbarman?hl=en?hl=en-GB
 
---
You received this message because you are subscribed to the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pgbarman+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Blobster

unread,
Feb 27, 2013, 12:32:55 PM2/27/13
to pgba...@googlegroups.com, pie...@boizot.name
Hi Pierre:
Thanks for your reply. The master already has archiving enabled (wal_level = hot_standby, archive_mode = on), so it is already sending the WAL files over the (somewhat slow) WAN to the slave. So on the slave I already have the WAL files. Can I run barman on the slave, adding incoming_wals_directory = {existing directory} to my barman.conf under the Main section? Some of the things I have read on this group seem to indicate that I can, and some that I can't.
Best,
Blobster

Pierre BOIZOT

unread,
Feb 27, 2013, 3:28:28 PM2/27/13
to pgba...@googlegroups.com
HI,

In PostgreSQL 9.1 we got pg_basebackup – it is a tool to make backup of pg instance that works over the PG connection. It is very smart tool, and definitely a big benefit for Pg.

But – it was limited to being able to make backups off master only.

read the post

Cheers.

Pierre


Pierre BOIZOT
Chemin des Mayoresses, 4
CH-1012 LAUSANNE
Home : +41 21 311 72 87



2013/2/27 Blobster <his...@gmail.com>

Blobster

unread,
Feb 27, 2013, 3:47:43 PM2/27/13
to pgba...@googlegroups.com, pie...@boizot.name
Thanks Pierre, that's a very useful post! I'm going to try it out.
Blobster

Gabriele Bartolini

unread,
Feb 28, 2013, 7:02:29 AM2/28/13
to pgba...@googlegroups.com
Hello,

thanks Pierre for your reply. What you are saying is right, as Barman
currently does not support streaming replication.

On Wed, 27 Feb 2013 21:28:28 +0100, Pierre BOIZOT <pie...@boizot.name>
wrote:
> In PostgreSQL 9.1 we got [1] pg_basebackup – it is a tool to
> make backup of pg instance that works over the PG connection. It is
> very smart tool, and definitely a big benefit for Pg.
>
> But – it was limited to being able to make backups off master only.

That is not entirely true. From 9.2 PostgreSQL introduced cascading
streaming replication and slaves can now act as servers for streaming
replication ONLY. A slave server is in continuous recovery and cannot
relay file-based archiving of WAL files (which limits Barman).

Again, until Barman supports streaming replication, this feature is
not available.

Cheers,
Gabriele
--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
Gabriele....@2ndQuadrant.it - www.2ndQuadrant.it

Narendran Narayanaswamy

unread,
Sep 11, 2015, 1:28:43 PM9/11/15
to Barman, Backup and Recovery Manager for PostgreSQL, Gabriele....@2ndquadrant.it
Gabriele,

Anything changed or updated on barman in this front ? Is currently setting up barman from slave is supported ?

-Naren
  Gabriele.Bartolini@2ndQuadrant.it - www.2ndQuadrant.it
Reply all
Reply to author
Forward
0 new messages