ahnooie.rdiff-backup-script

Rdiff-Backup Script Ansible Role

This Ansible Role automates backups by setting up an rdiff-backup script and a list of servers to back up from the Ansible inventory. It will install rdiff-backup on both the client machines and the backup server. The server will create a script and a cron job that regularly pulls backups from the clients using rdiff-backup and SSH. It will also generate SSH keys on the server and add them to the client's authorized_keys file, allowing for passwordless SSH access. Whenever servers are added or removed in Ansible, the backup list will update automatically.

Requirements

This role works on any popular Linux distribution for both the client and backup server, as long as rdiff-backup is available in the package repository.

rdiff-backup is included in the latest versions of Ubuntu, Debian, and Fedora. For RedHat or CentOS 6 and 7, you need to enable the EPEL repositories.

Role Variables

Required:

rdiff_backup_server: backupserver.example.com

Optional:

state: present (default) or absent
rdiff_backup_command: (optional, replaces the default command)
rdiff_prune_command: (optional, replaces the default command)
rdiff_cron_minute: (defaults to 43)
rdiff_cron_hour: (defaults to 1)

Dependencies

none

Example Playbook

Playbook

- hosts: servers
  roles:
    - { role: ahnooie.rdiff-backup-script, rdiff_backup_server: backupserver.example.com }

Inventory File

[servers]
servera.example.com
serverb.example.com
serverc.example.com

License

MIT

Author Information

Created by Benjamin Bryan

Informazioni sul progetto

Manage rdiff-backup script

Installa
ansible-galaxy install ahnooie.rdiff-backup-script
Licenza
mit
Download
467
Proprietario