talira

Backup and Recovery Manager for PostgreSQL

open sourceGPL-3.0-onlyself-hostablefree

Barman (Backup and Recovery Manager) is EnterpriseDB's open source disaster recovery tool for PostgreSQL: a Barman server takes physical backups of many Postgres servers (with pg_basebackup streaming or rsync over SSH), archives their WAL, keeps a catalogue of backups under retention policies and restores any of them to a point in time. Its barman-cloud commands (the barman-cli-cloud package) back up and archive WAL straight from the Postgres host to Amazon S3 or S3-compatible stores, Azure Blob Storage or Google Cloud Storage, with no Barman server, and also handle cloud volume snapshots and object lock. It's written in Python under GPL-3.0, and CloudNativePG's backups use it through the Barman Cloud Plugin.

Ways to install

Problems it solves

  • restore our production Postgres to how it was five minutes before someone ran a bad DELETE
  • one backup server that manages backups for all our Postgres instances
  • continuous WAL archiving so we lose at most a few seconds of Postgres data in a disaster
  • keep Postgres backups for 30 days and delete older ones automatically
  • ship Postgres base backups and WAL straight to an S3 bucket from the database server
  • Postgres backups in Azure Blob Storage or Google Cloud Storage
  • backups in object storage that ransomware or a mistake can't delete during the retention period
  • block-level incremental Postgres backups so nightly backups don't copy the whole database
  • a second copy of our Postgres backups in another data centre
  • check that our Postgres backup setup is healthy before we actually need it
  • take Postgres backups as cloud disk snapshots for very large databases

Features

  • physical backups with pg_basebackup (streaming) or rsync over SSH
  • point-in-time recovery
  • WAL archiving and WAL streaming
  • backup catalogue: list, keep, delete, archive and recover full backups
  • retention policies
  • manage backups of several Postgres servers from one Barman server
  • barman-cloud-* commands: backups and WAL archiving straight to S3, Azure Blob Storage or Google Cloud Storage
  • S3-compatible object stores through Boto3
  • object lock (WORM) support for cloud backups
  • cloud snapshot backups (AWS, Azure, Google) and AWS Outposts
View 5 more
  • block-level incremental backups (streamed to the cloud with a Barman server)
  • geographical redundancy between Barman servers
  • hook scripts
  • backup export and import
  • barman check for diagnosing the setup

Limitations

  • Doesn't run on Windows: the Barman server needs Linux or another UNIX-like OS3
  • Doesn't take logical backups: no pg_dump, only physical backups of the whole cluster4

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Barman does.

  1. pgBackRest Reliable PostgreSQL backup and restore
  2. WAL-G Archival and restoration for databases in the cloud
  3. Databasus PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
  4. Barman Cloud Plugin The reference CNPG-I backup/restore plugin for Barman Cloud

Compare Barman with the top 3