baztian.borgbackup
borgbackup / borgmatic ansible role
Ansible role to install BorgBackup along with borgmatic to allow for automated backup.
The configuration parts are based on jprltsnz.borgmatic and m3nu.ansible_role_borgbackup.
Requirements
The respositories
parent directory from borgmatic_configs
(see below) need to exist, or this role
will fail.
For older distribution releases borgmatic will be installed using baztian.pip_venv. Therefore you should consider downloading that role first.
Role variables
borgmatic_init_repos
: Whether to initialize the repos or not. Set toFalse
if you want to initialize withborgmatic init...
yourself.borgmatic_init_encryption
: The encryption algorithm to use. By default it is set nonone
.borgmatic_timer
: Theborgmatic.timer
'sOnCalendar
value. See systemd documentation for valid values.borgmatic_configs
: A dict with the contents of borgmatic per application configuration file. This is copied verbatim to the borgmatic config folder. This role is set for per-application setup. See the borgmatic reference documentation for a complete list of available configuration.
Example Playbook
- hosts: servers
become: yes
roles:
- role: baztian.borgbackup
vars:
borgmatic_configs:
backup-etc:
location:
source_directories:
- /etc
repositories:
- /srv/backup_etc
atime: false
exclude_patterns:
- icon_cache
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 12
backup-home:
location:
source_directories:
- /home
repositories:
- /srv/backup_home
atime: false
exclude_patterns:
- icon_cache
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 12
License
MIT
Install
ansible-galaxy install baztian.borgbackup
License
mit
Downloads
47
Owner