No description
criteria | ||
defaults | ||
files | ||
handlers | ||
meta | ||
tasks | ||
templates | ||
tests | ||
vars | ||
README.md |
Ansible Role: rsnapshot
This role installs and configures rsnapshot on Debian-based systems.
Requirements
This role has been tested on Debian 11 (Bullseye) and should work on other Debian-based systems.
Role Variables
All variables are defined with their default values in defaults/main.yml
. An exhaustive description of the variables is available in criteria/variables.json
. Here are a few notable variables:
Variable | Default Value | Description |
---|---|---|
rsnapshot_snapshot_root |
/var/lib/rsnapshot |
Root directory for storing snapshots. |
rsnapshot_retains |
{"hourly": 6, "daily": 7, "weekly": 4, "monthly": 12 } |
Retention policy for snapshots. |
rsnapshot_backups |
[] |
Array of backup configurations. See example below. |
rsnapshot_backup_scripts |
[] |
Array of scripts to execute before backups. |
Dependencies
None.
Example Playbook
- hosts: backupservers
become: true
roles:
- role: glenux.rsnapshot
vars:
rsnapshot_backups:
- remote:
user: backupuser
host: 192.168.1.10
paths:
- /etc
- /home
local: server1
- remote:
user: backupuser
host: 192.168.1.11
paths:
- /var/www
local: server2
rsnapshot_backup_scripts:
- /usr/local/bin/mysql_backup.sh
- /usr/local/bin/postgres_backup.sh
License
This project is licensed under the BSD License - see the LICENSE file for details.
Author Information
This role was created by glenux.