Barman and local to host backups

1,416 views
Skip to first unread message

Austen Birchall

unread,
Dec 9, 2013, 10:43:51 AM12/9/13
to pgba...@googlegroups.com
I an currently evaluating Barman and working through the tutorial.
 
The approach that we taken on a different RDBMS is that rather than copying the backups andd WAL logs to a central sector we have stored these on a seperate Logical Volume on the actual database host. To illustrate our Postgres hosts have a:

/var/lib/pgsql
 
LV of say 4.5G
 
and we would write the WAL logs to a local
 
/var/lib/backups
 
LV also of 4.5G.
 
Is it possible to setup these type of backups in Barman?
 
Thanks
 
Austen
 
 

Damon Snyder

unread,
Dec 10, 2013, 2:00:35 AM12/10/13
to pgba...@googlegroups.com
Hi Austen,
Doing your backups like this should be possible though I wouldn't recommend it. If the data you are backing up is critical to the operation/business you should consider the layout of the logical volume. 

For example, is the logical volume sharing the same physical device as the /var/lib/pgsql or are they on different disks or storage systems?

How long would it take you to recover if you lost the host operating system or hardware due to OS or hardware failure? Could you recover if you lost either of those? Is the operation ok with your answer to these questions? Could you easily move the physical hardware supporting the logical volume to another system? How long would that take?

These are just a few things you might want to consider before proceeding down this path.

Hope this helps,
Damon


--
--
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.



--
http://damonsnyder.net

Austen Birchall

unread,
Dec 10, 2013, 5:34:38 AM12/10/13
to pgba...@googlegroups.com

Damon
 
Thanks for the reply. At the moment as I am evalating Barman I have been tasked to look at all options so I am interested in how/if Barman can operate on a single host. In addition due to the way our hardware is set out having the backups & database on the 'same' host is not really as issue for us, a bigger issue would be the network traffic than remote backups of large database would cause (even with  bandwidth_limit set). my obvious idea would be to setup ssh for barman & postgres users on the same host - train01 here - is the correct/recommended way to proceed?
 
Austen

Giulio Calacoci

unread,
Dec 10, 2013, 6:38:27 AM12/10/13
to pgba...@googlegroups.com
Hi Austen,

Will this work?
Yes.
It Is possible to use localhost as backup server, as you said, you only
need to setup ssh for barman and postgres users, and barman will work.
Is this Correct/Recommended?
No.

I mean, using a database server and a backup server on the same machine
is risky.

If the machine has a single disk (so far you talked about logical
volumes not disks) with a hardware failure you will lose data from
postgres and backup data.

If you have server with multiple disks, simply your single point of
failure is the O.S.
If the O.S. of your server hangs, you are going to lose 2 services:
Database server and Backup server, and this is no good.

Just, consider the idea of barman with a bandwith_limit configuration on
a different machine, if you can, it's the safest way .

Regards

Giulio.

--
Giulio Calacoci - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
giulio....@2ndQuadrant.it | www.2ndQuadrant.it

Austen Birchall

unread,
Dec 10, 2013, 7:12:58 AM12/10/13
to pgba...@googlegroups.com
 
 
 Giulio
 
Thanks for this - I take on board what you have said and will bring it to the

attention of those will actually make the decision of what architecture we go with.

My task at present is just to get it working so I give it a try!

 

Regards

 

Austen

Austen Birchall

unread,
Dec 10, 2013, 7:17:44 AM12/10/13
to pgba...@googlegroups.com

Actually thinking about it my question is:
 
Is it possible to have the Barman catalog and the actual backups themselves on seperate hosts
 

 

Regards

 

Austen

Giulio Calacoci

unread,
Dec 10, 2013, 12:39:45 PM12/10/13
to pgba...@googlegroups.com
Il 10/12/2013 13:17, Austen Birchall ha scritto:
> Is it possible to have the Barman catalog and the actual backups
> themselves on seperate hosts
Hi Austen,

No, presently is not possible to move catalog and backups on a remote
server but is something we are planning to
implement in the future.


Regards

Martin Gudmundsson

unread,
Jan 7, 2014, 5:00:54 PM1/7/14
to pgba...@googlegroups.com, giulio....@2ndquadrant.it


Den tisdagen den 10:e december 2013 kl. 12:38:27 UTC+1 skrev Giulio Calacoci:
Il 10/12/2013 11:34, Austen Birchall ha scritto:
> Thanks for the reply. At the moment as I am evalating Barman I have
> been tasked to look at all options so I am interested in how/if Barman
> can operate on a single host. In addition due to the way our hardware
> is set out having the backups & database on the 'same' host is not
> really as issue for us, a bigger issue would be the network traffic
> than remote backups of large database would cause (even with
>  bandwidth_limit set). my obvious idea would be to setup ssh for
> barman & postgres users on the same host - train01 here - is the
> correct/recommended way to proceed?
> Austen
Hi Austen,

Will this work?
Yes.
It Is possible to use localhost as backup server, as you said, you only
need to setup ssh for barman and postgres users, and barman will work.
Is this Correct/Recommended?
No.

Is there any downside of using postgres as the barman user in a local backup scenario like this?

I mean, using a database server and a backup server on the same machine
is risky.

If the machine has a single disk (so far you talked about logical
volumes not disks) with a hardware failure you will lose data from
postgres and backup data.

If you have server with multiple disks, simply your single point of
failure is the O.S.
If the O.S. of your server hangs, you are going to lose 2 services:
Database server and Backup server, and this is no good.

Well, If your backup filesystem is an remote filesystem, like an NFS share or Glusterfs volume, you would not have the OS as a single point of failure.
I guess it depends on what is available to you as well. I like to reuse as much of my infrastructure as possible, but of course without taking chances.
And I think a local backup setup is easier to deploy and manage than keeping a seperate backup server around for that purpose. If your backup target filesystem is secure and reliable enough, then I don't see an issue with a local setup. Or am I wrong?

Giulio Calacoci

unread,
Jan 8, 2014, 4:58:28 AM1/8/14
to pgba...@googlegroups.com
Il 07/01/2014 23:00, Martin Gudmundsson ha scritto:


Den tisdagen den 10:e december 2013 kl. 12:38:27 UTC+1 skrev Giulio Calacoci:
Il 10/12/2013 11:34, Austen Birchall ha scritto:
> Thanks for the reply. At the moment as I am evalating Barman I have
> been tasked to look at all options so I am interested in how/if Barman
> can operate on a single host. In addition due to the way our hardware
> is set out having the backups & database on the 'same' host is not
> really as issue for us, a bigger issue would be the network traffic
> than remote backups of large database would cause (even with
>  bandwidth_limit set). my obvious idea would be to setup ssh for
> barman & postgres users on the same host - train01 here - is the
> correct/recommended way to proceed?
> Austen
Hi Austen,

Will this work?
Yes.
It Is possible to use localhost as backup server, as you said, you only
need to setup ssh for barman and postgres users, and barman will work.
Is this Correct/Recommended?
No.

Is there any downside of using postgres as the barman user in a local backup scenario like this?
I think you could have some problems with tablespaces. if you use postgres user, barman is able to overwrite the original cluster tablespaces during a local recovery, usually is something that you don't want.

I mean, using a database server and a backup server on the same machine
is risky.

If the machine has a single disk (so far you talked about logical
volumes not disks) with a hardware failure you will lose data from
postgres and backup data.

If you have server with multiple disks, simply your single point of
failure is the O.S.
If the O.S. of your server hangs, you are going to lose 2 services:
Database server and Backup server, and this is no good.

Well, If your backup filesystem is an remote filesystem, like an NFS share or Glusterfs volume, you would not have the OS as a single point of failure.
I guess it depends on what is available to you as well. I like to reuse as much of my infrastructure as possible, but of course without taking chances.
And I think a local backup setup is easier to deploy and manage than keeping a seperate backup server around for that purpose. If your backup target filesystem is secure and reliable enough, then I don't see an issue with a local setup. Or am I wrong?

The purpose of Barman is to create a centralised Backup server between multiple Postgres servers, using the same server is something that works, and is something we tested, but is not something that I would do.
Is not a matter of technical limitation, it is a conceptual matter. Usually a more distributed infrastructure is preferred. Obviously is not always the best solution, and that's why barman works also for a single db/backup server, but is like driving a nail in using a rock, it works, but is not the way I would suggest.
Reply all
Reply to author
Forward
0 new messages