barman-cli - which exact commands are being triggered on the pg host?

Skip to first unread message

May 6, 2022, 12:19:19 PMMay 6
In the paper I am writing on Barman vs pgBackRest I say something like:
"A PostgreSQL Cluster backed up via Barman requires barman-cli to be installed.
barman-cli is a selection of commands which are executed on the PostgreSQL Server when a Barman operation is started on the Barman Backup host"
Now I would like to give one or two examples for such Barman commands. Can anybody help me out here?

Michael Wallace

May 9, 2022, 4:49:46 AMMay 9
barman-cli isn't required by Barman in order to perform backup and recovery but it can be very helpful - the two commands are documented in the manual, specifically:
  • barman-wal-archive - this can be used as PostgreSQL's archive_command instead of rsync. The main reason for doing so is that barman-wal-archive will not just copy the WAL to the Barman server but it will also ensure it is flushed to disk using fsync. If plain rsync is used then the WAL may remain in a cache on the Barman server and not be flushed to disk until after archive_command has returned successfully.
  • barman-wal-restore - this can be used as PostgreSQL's restore_command and is added to the recovery options when `get-wal` is specified in recovery_options *and* a remote recovery is requested via the --remote-ssh-command option. This allows PostgreSQL to fetch the WALs required for point-in-time recovery without requiring Barman to copy the WALs to the PostgreSQL server during the recovery process.
If barman-cli isn't installed on the PostgreSQL server then backup and restore are still possible however:
  1. WAL archive can only be performed using rsync directly.
  2. WALs cannot be fetched from a remote Barman server during recovery and are instead copied to the PostgreSQL server during the `barman recover` command.
Hope this helps.

You received this message because you are subscribed to the "Barman for PostgreSQL" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

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
To view this discussion on the web, visit
Reply all
Reply to author
0 new messages