814e4be128
This introduces two new roles for managing the backup-server and hosts that we wish to back up. Firstly the "backup" role runs on hosts we wish to backup. This generates and configures a separate ssh key for running bup and installs the appropriate cron job to run the backup daily. The "backup-server" job runs on the backup server (or, indeed servers). It creates users for each backup host, accepts the remote keys mentioned above and initalises bup. It is then ready to receive backups from the remote hosts. This eliminates a fairly long-standing requirement for manual setup of the backup server users and keys; this section is removed from the documentation. testinfra coverage is added. Change-Id: I9bf74df351e056791ed817180436617048224d2c
24 lines
832 B
ReStructuredText
24 lines
832 B
ReStructuredText
Configure a host to be backed up
|
|
|
|
This role setups a host to use ``bup`` for backup to any hosts in the
|
|
``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 ``bup`` tool is installed and a cron job is setup to run the
|
|
backup periodically.
|
|
|
|
Note the ``backup-server`` role must run after this to create the user
|
|
correctly on the backup server. This role sets a tuple ``bup_user``
|
|
with the username and public key; the ``backup-server`` role uses this
|
|
variable for each host in the ``backup`` group to initalise users.
|
|
|
|
**Role Variables**
|
|
|
|
.. zuul:rolevar:: bup_username
|
|
|
|
The username to connect to the backup server. If this is left
|
|
undefined, it will be automatically set to ``bup-$(hostname)``
|