Role Detail

ahnooie.rdiff-backup-script

Manage rdiff-backup script
Downloads
6
Type Ansible
Minimum Ansible Version 2.4
Installation $ ansible-galaxy install ahnooie.rdiff-backup-script
Tags
backup
Last Commit
Last Imported
OS Platforms
Platform Version
Debian buster
Debian etch
Debian jessie
Debian lenny
Debian sid
Debian squeeze
Debian stretch
Debian wheezy
EL 5
EL 6
EL 7
Fedora 16
Fedora 17
Fedora 18
Fedora 19
Fedora 20
Fedora 21
Fedora 22
Fedora 23
Fedora 24
Fedora 25
Fedora 26
Fedora 27
Ubuntu artful
Ubuntu bionic
Ubuntu lucid
Ubuntu maverick
Ubuntu natty
Ubuntu oneiric
Ubuntu precise
Ubuntu quantal
Ubuntu raring
Ubuntu saucy
Ubuntu trusty
Ubuntu utopic
Ubuntu vivid
Ubuntu wily
Ubuntu xenial
Ubuntu yakkety
Ubuntu zesty
Last 10 Imports
Completed Status
SUCCESS
SUCCESS
SUCCESS
FAILED

Rdiff-Backup Script Ansible Role

Ansible Role automates backups by configuring an rdiff-backup script and list of servers to backup up from ansible inventory. It will install rdiff-backup on both the clients and server. On the server it creates a script and cron job to pull backups from clients periodically using rdiff-backup and ssh. It will also generate ssh keys on the server and add those to the client's authorized_keys file for passwordless ssh authentication. As servers are added and removed (marked present or absent) in ansible the backup list is automatically updated.

Requirements

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

rdiff-backup is included in recent versions of Ubuntu, Debian, and Fedora. For RedHat or CentOS 6 and 7 you'll need EPEL repos enabled.

Role Variables

Required:

rdiff_backup_server: backupserver.example.com

Optional:

state: present (default) or absent
rdiff_backup_command: (optional, overrides default command)
rdiff_prune_command: (optional, overrides 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

None