Ansible role which installs and configures Barman, a backup manager for Postgresql.
This role has been tested on Ansible 2.3.0 and higher.
To install:
ansible-galaxy install trainline-eu.ansible_barman_role
No dependencies
Recommended related roles:
- trainline-eu.ansible_postgresql_role
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
# 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
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.
Licensed under the MIT License. See the LICENSE file for details.
Creators:
Maintainers:
Are welcome!