rsync vs. pg_basebackup

1,595 views
Skip to first unread message

Tomáš Tunys

unread,
Nov 27, 2012, 7:17:04 PM11/27/12
to pgba...@googlegroups.com
Hi, guys!

I am just wondering, why barman uses the PG's pg_start_backup/pg_stop_backup and copies the contents of the database cluster on its own with rsync? Why it does not simply rely on the PG's pg_basebackup? Is it more efficient to use rsync? I would see it as the best and reliable method to use rsync in case the backup could be retried in case the connection fails but that is not supported. Could someone give me a hint why the rsync is used, please, and forgive me if its a stupid question, I am just starting with all 'this' stuff.

Tomas 

Gabriele Bartolini

unread,
Nov 28, 2012, 3:21:14 AM11/28/12
to pgba...@googlegroups.com
Hi Tomas,

  thanks for writing and for using Barman.

2012/11/28 Tomáš Tunys <tuny...@gmail.com>

I am just wondering, why barman uses the PG's pg_start_backup/pg_stop_backup and copies the contents of the database cluster on its own with rsync? Why it does not simply rely on the PG's pg_basebackup?

pg_basebackup has been added in PostgreSQL 9.1. Our aim with Barman is to support all maintained PostgreSQL versions. Exclusive physical backup exists in Postgres since version 8.1.
 
Is it more efficient to use rsync? I would see it as the best and reliable method to use rsync in case the backup could be retried in case the connection fails but that is not supported.

rsync is an option. Currently the only one. Future Barman versions will include exclusive ssh connections (libpq through SSH tunneling) and exclusive libpq connections (using pg_basebackup and pg_receivexlog, which will allow synchronous backup). It is just a matter of time and sponsorships.

Consider also that rsync is the basis for the another important feature of future versions: incremental backup.
 
Could someone give me a hint why the rsync is used, please, and forgive me if its a stupid question, I am just starting with all 'this' stuff.

As we always say in our training courses, there is no stupid question.

Thanks for giving us the chance to explain this in the mailing list.

Cheers,
Gabriele

--
 Gabriele Bartolini - 2ndQuadrant Italia
 PostgreSQL Training, Services and Support
 www.2ndQuadrant.it
Reply all
Reply to author
Forward
0 new messages