Skip to content

trainline-eu/ansible-barman-role

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barman Ansible role Build Status

Ansible role which installs and configures Barman, a backup manager for Postgresql.

Installation

This role has been tested on Ansible 2.3.0 and higher.

To install:

ansible-galaxy install trainline-eu.ansible_barman_role

Dependencies

No dependencies

Recommended related roles:

  • trainline-eu.ansible_postgresql_role

Compatibility matrix

This table lists the tested version of OS/Barman couples.

Distribution / PostgreSQL 2.x
Debian 8.x
Debian 9.x
Debian 10.x
  • ✅ - tested, works fine

Variables

# Basic settings
barman_databases:                                 # Mandatory
  - name: 'app1'                                     # Mandatory
    description: 'Database of App1'                  # Mandatory
    primary_host: "{{ groups['db-app1'][0] }}"       # Mandatory
    postgres_barman_password: 'super_secure_vaulted' # Mandatory
    backup_method: rsync                             # Optional (default value)
    retention_policy: 'RECOVERY WINDOW OF 7 DAYS'    # Optional (default value)
    standby_hosts: "{{ groups['db-app1'][1:] }}"     # Optional (Automatically authorize SSH this servers list)
    extract_host_from_var: 'ec2_private_ip_address'  # Optional (host variable to extract from inventory hostvars)

barman_restore_directory: "/home/restore-$server"

barman_rsync_daemon_enabled: true (default to false)
# If Rsync daemon is enabled
barman_rsync_allowed_hosts: 10.0.0.0/24
barman_rsync_password: "vaulted_secret_password"

# Barman configuration
# See http://docs.pgbarman.org/release/2.4/barman.5.html#configuration-file-syntax
# to understand the following settings
barman_config:                        # Optional
  reuse_backup: "None|link|copy"
  bandwith_limit: 0
  parallel_jobs: 2
  network_compression: true|false
  backup_options: exclusive_backup|concurrent_backup

Testing

There are currently no tests written in this project.

However the role is tested together with the postgresql role in a set of automatic integration tests.

License

Licensed under the MIT License. See the LICENSE file for details.

Thanks

Creators:

Maintainers:

Feedback, bug-reports, requests, ...

Are welcome!

About

Ansible role to install and configure barman, a Postgresql backup manager tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published