system-config/playbooks/roles/borg-backup
Ian Wienand e878b0ee83 borg-backup: use unique mark in .ssh/config
This writes out the ssh config so the backup process uses the right
key/user.  Since we have a transition period where we have bup and
borg backups we need to make the borg config have unique markers, or
the two fight over the configuration block.

Change-Id: I5455da3f2829e2aa8e0c531193adbbeff4b4776d
2020-10-20 11:43:39 +11:00
..
defaults borg-backups: add some extra excludes 2020-10-14 10:01:07 +11:00
tasks borg-backup: use unique mark in .ssh/config 2020-10-20 11:43:39 +11:00
templates Add borg-backup roles 2020-07-21 17:36:50 +10: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)