Client Setup Role
We provide a ready-to-use Ansible role to install Borg, Borgmatic and a cron job on a Linux client (tested on Ubuntu/Debian/CentOS/Fedora) client. Example usage in a playbook:
- hosts: webservers roles: - role: borgbackup borg_encryption_passphrase: CHANGEME borg_repository: firstname.lastname@example.org:repo borg_source_directories: - /srv/www - /var/lib/automysqlbackup
Steps to use this role:
- Clone Github repository into your
- Add a new repository without SSH key in BorgBase
- Replace Borg passphrase, repository URL and source directories in your playbook
- Run playbook against client host. A new SSH key will be created and displayed.
- Add new SSH key in BorgBase.
borgmatic init --encryption repokey-blake2to validate the connection and initialize the new repository.
Learn more on the Github page of the project.
Interacting with the BorgBase API via Ansible
BorgBase user @adhawkinsgh has created a range of Ansible modules that interact with the BorgBase API for a fully automated setup. These roles will also set up new repos and SSH keys with BorgBase.