papanito.borg
Ansible role do install and setup regular backups with borg-backup
Posted April 25, 2022 by Adrian Wyssmann
Source
https://github.com/papanito/ansible-role-borg
Role Summary
Ansible role do install and setup regular backups with borg. The role does the following
-
[Optional] Delete existing repository
-
Initialize a repository at
protocol
://backup_server
:target_dir
ortarget_dir
Notes
In case the repo
target_dir
already exists, the initalization will be skipped Ifbackup_server
is not specified role assumes a local backup i.e. to a local directory -
Create a
systemd
service which regularly (accoring tobackup_schedule
) runs scriptborg.sh
from borgbackup.org -
There will be an individual borg-script named
automatic-backup-{{service_name}}.sh
in/opt/borg_backup
which is customized withbackup_source_dir
backup_exclude_file
orbackup_exclude_list
backup_schedule
Background
During the past years I used different tools for backup but ultimately found borg one of the best to use.4