Binary Replication Tools

From PostgreSQL wiki

(Difference between revisions)
Jump to: navigation, search
(Purpose)
(Comparison Matrix =)
Line 20: Line 20:
 
{|border=1
 
{|border=1
 
!Tool!!Documentation!!License!!Makes base backups!!Makes base backups from replicas!!Manages backups!!Creates replicas!!Monitors replication delay!!Supports automated failover
 
!Tool!!Documentation!!License!!Makes base backups!!Makes base backups from replicas!!Manages backups!!Creates replicas!!Monitors replication delay!!Supports automated failover
 +
|-
 +
| [http://www.pgbarman.org/ pgbarman]
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| [https://github.com/omniti-labs/omnipitr OmniPITR]
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| [http://code.google.com/p/pg-rman/ pg-rman]
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| [http://www.repmgr.org/ repmgr]
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| [https://github.com/markokr/skytools Skytools]
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| [https://github.com/heroku/WAL-E WAL-E]
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 
|-
 
|-
 
|}
 
|}

Revision as of 23:04, 29 December 2012

Contents

Purpose

Compare binary replication tools for PostgreSQL for features and ease of use.

The features these tools help automated include:

  • Managing binary backups (create, track, restore)
  • Managing creation of replicas
    • Streaming replication
    • Cascaded replication
    • WAL-shipping replication
  • Monitoring of replication delay
  • Automated failover
  • Automated "following" of a new master by secondary replicas

My goal is to classify and differentiate the various tools for easier selection and fit to purpose.

Comparison Matrix =

Tool Documentation License Makes base backups Makes base backups from replicas Manages backups Creates replicas Monitors replication delay Supports automated failover
pgbarman
OmniPITR
pg-rman
repmgr
Skytools
WAL-E

Barman

pgbarman Demo setup for pgbarman

Summary of features:

  • Creates base backups
  • Uses SSH as transport for backup
  • Configuration stored in file or command-line
  • Restore is automatable for creating replicas, although not explictly supported
  • GPLv3

Install notes:

  • Had a dependency problem with 9.1 on Ubuntu Precise, so installed from source
  • Missing dep for argcomplete, noted in README in demo repo
  • written in Python

OmniPITR

OmniPITR Demo of a simple replication setup with OmniPITR

Summary of Features:

  • Creating PITR backups from Master or Slave
  • Restoring a PITR backup for DR
  • Creating replicas (by untarring backups)
  • Monitoring of replicas
  • Supports 'pause removal' of WAL during a backup (nice!)
  • PostgreSQL license

Install notes:

  • No packaging, perl
  • No documented support for streaming replication
  • Uses '^' instead of '%' in custom logfile naming
  • No configuration file option (instead of using long command-line options)
  • Supported on all Linux, Solaris variants

pg-rman

pg-rman Simple demo for pg_rman setup

Summary of features:

  • Online backup and recovery, including backup from a replica
  • Archive management and restore
  • .ini configuration file
  • Simple command-line options

Install notes:

  • Written in C, install with 'make USE_PGXS=1'
  • On Ubuntu/Debian, installs in non-default bin directory
  • Commands are simple, manages WAL archive as well as backups


repmgr

repmgr Demo of a simple setup with repmgr

Supported features:

  • Setting up new replicas/hot_standby with streaming replication (makes recovery.conf itself)
  • Making base backups
  • Failover (automated, or not, including redirecting replicas to connect to a new master after failover)
  • Lag monitoring (repmgrd)
  • A "witness" DB server for monitoring (typically on a replica)
  • License: GPLv3

Install notes:

  • Written in C
  • Installs like a typical UNIX utility out of postgresql/contrib source tree (make USE_PGXS=1; make USE_PGXS=1 install)
  • Developed on Debian systems, so support for package is present. Did not find an Ubuntu package for repmgr, however.
  • Detailed docs are in the README for installing on many Linux platforms
  • Doesn't appear to be supported on Mac OS X

Skytools / walmgr

Skytools

WAL-E

WAL-E

Personal tools