Barman (Backup and Recovery Manager) is a software solution that performs and manages PostgreSQL database backups and recovery. Barman is open-source, maintained by EnterpriseDB, and distributed under GNU GPL 3. It uses PostgreSQL's Point-in-Time Recovery technology to enable recovery at any desired point in time. Barman supports Incremental backups that can reduce backup time and infrastructure resource usage by only backing up changed data blocks. Its Stream Archiving feature can achieve zero Recovery Point Objective (RPO) by continuously backing up Write-Ahead Log (WAL) files in real-time. Barman also provides a backup catalog to list, keep, delete, archive, and recover multiple full backups.

As of Foglight v. 7.1, Foglight can monitor Barman backups. 

*(Click on images to enlarge.)

This serves as the entry point to the Barman hosts.

Architectural setups: 

  • One BARMAN host backing up one PostgreSQL Server 
  • One BARMAN host backing up multiple PostgreSQL Servers 
  • Multiple BARMAN hosts backing up multiple PostgreSQL Servers 

In this example, this is a (parent) Barman host (on AWS) backing up 2 Postgres instances

View Hostname, Barman version, availability (‘Connected’), Status (‘ok’), Name (BARMAN server name or ID)—it must be a unique name/ID (BARMAN’s identifier), Postgres Instance, and Host:Port to be backed up. The dashboard also includes information on active and passive nodes, minimum redundancy, number of available backups, and PostgreSQL agent status.

The icon in the top right corner accesses a list of available columns of data for the dashboard.

Geographical Redundancy:

The screenshot below shows the same Foglight dashboard as above but connected to a different environment with three hosts configured. Barman offers the capability of maintaining geographical redundancy. So, for example, say there is a Barman host in the US and another in the EU. The US host backs up PostgreSQL servers in the US. The EU host can connect to the US host to relay backup catalogs. This setup avoids direct communication between the EU host and the US PostgreSQL servers, ensuring efficient and redundant backup management across different locations.

Selecting a BARMAN host navigates to the Host monitor dashboard.

Selecting a PostgreSQL instance navigates to the Postgres Overview dashboard.

Selecting a (BARMAN server) Name navigates to the BARMAN server overview dashboard.

Note the 3 tabs at the top: Overview / Backups / Configuration

Overview tab:

See general data of the PostgreSQL Server status including the host, port, PostgreSQL version, cluster state, current data size, and environment server name or ID. There is also general information about the host's availability and the environment version. Barman checks help ensure everything is working correctly. Commands are run on the Barman host, and each server's status is checked for a given time. Running a Barman check command shows whether your configuration, backups, and redundancy requirements are ok. Failed checks trigger Foglight alerts. In Foglight, if a check fails, it might indicate issues like failed backups or directory permission problems. Failed checks can also cause other checks to fail. Status history shows the state of checks at specific times, helping to pinpoint errors. The dashboard shows backup catalog information including available backups, backup IDs, and retention policies. There are charts for backup size and completion time. The status history and current WAL segment are also displayed. This overview helps manage your backups and server health.

Backups tab:

This dashboard shows the Backup ID, start and end times, status, retention policy, disk usage, and performance metrics. Performance data includes copy time, throughput, and Write-Ahead Log (WAL) file details. The table makes it easier to visualize this data compared to running SSH commands on the Barman host. Additionally, there are graphs showing backup size, growth rate, and backup completion times. The status history records all backups, even if they are deleted from the Barman host, based on the retention policy on the FMS. This helps manage and monitor PostgreSQL server backups efficiently.

Configuration Tab:

The Configuration dashboard displays a table with all the configuration information for your Barman PostgreSQL server. It shows details like backup directories, Barman home, lock directory, and error directory, making it easy to view your setup This table helps you quickly check and manage your configuration again without running SSH commands. 

Alarms:

With the addition of Foglight's Postgres Barman backup monitoring support, 53 alarms have been added to keep you aware of issues with your backups.

Reports: 

Barman-specific reports are available through the Foglight PostgreSQL reports template. For example, there is the Barman Backup Table report, which shows the current check status, and the Barman PostgreSQL Server table report, which displays the status of monitored PostgreSQL servers backed up by Barman. A use case might be that these reports can be scheduled and emailed ahead of a backup maintenance window to confirm everything is in order. 

(Top right of the dashboard)

Agent Properties:

Lastly, a new section called 'Barman Monitoring' has been added to the Agent Properties for the PostgreSQL cartridge, allowing one agent to monitor multiple PostgreSQL instances. This setup enables a single Barman host to back up multiple PostgreSQL servers. Configuration involves specifying SSH ports, optional host aliases, and multiple PostgreSQL server IPs or hostnames. This setup helps match PostgreSQL data inside the FMS. Each Barman server requires a unique configuration name or ID, and backup collection is limited to the last 10 backups to manage data volume. Connection timeouts are set to 30 seconds by default, and monitoring can be enabled or disabled for specific servers as needed.               *(Detailed instructions are available in online documentation.)

Visit Foglight for Databases to learn more and download a free trial.

 

Anonymous
Related Content