system-config/playbooks/roles/borg-backup
Ian Wienand dad4845470 borg-backup: prune after successful backup
After a successful backup run, perform a prune step to slim down to
keep the last 7 days, the last 4 weeks and the last 12 months of
backups.

Change-Id: I98d60319e333d22b3b48214d3dd9136e255a341f
2021-01-20 13:56:38 +11:00
..
defaults borg-backup: excludes updates 2020-11-12 15:25:34 +11:00
tasks borg-backup: space out cron jobs evenly 2020-11-11 12:57:32 +11:00
templates borg-backup: prune after successful backup 2021-01-20 13:56:38 +11:00
README.rst Add borg-backup roles 2020-07-21 17:36:50 +10:00

Configure a host to be backed up

This role setups a host to use borgp for backup to any hosts in the borg-backup-server group.

A separate ssh key will be generated for root to connect to the backup server(s) and the host key for the backup servers will be accepted to the host.

The borg tool is installed and a cron job is setup to run the backup periodically.

Note the borg-backup-server role must run after this to create the user correctly on the backup server. This role sets a tuple borg_user with the username and public key; the borg-backup-server role uses this variable for each host in the borg-backup group to initalise users.

Role Variables

The username to connect to the backup server. If this is left undefined, it will be automatically set to borg-$(hostname)