uos.smb_backup
Ansible Role for Backups with Samba Share
This ansible role configures autofs to mount a samba share and configure a script to run regular backups.
Role Variables
There are three required variables you need to set:
backup_smb_user: the user that will access the backup cloudbackup_smb_password: the password for this userbackup_script: The shell commands to run for creating a backup
Have a look at the defaults to see all variables and how to set them.
Example Playbook
Your playbook, could look like this:
- hosts: all
become: true
- role: uos.smb_backup
vars:
backup_smb_share: //smb.example.com/backup
backup_smb_user: samba_user
backup_smb_password: samba_user_password
backup_script: |
FILENAME="{{ backup_mountpoint }}/$(date '+%Y%m%d-%H%M%S').sql.gz"
mysqldump -u root dbname | gzip > "${FILENAME}"
License
Install
ansible-galaxy install uos.smb_backupLicense
bsd-3-clause
Downloads
716
Owner
VirtUOS is a central research and service facility of Osnabrück University, aiming to develop and deploy innovative teaching and learning technologies.
