Skip to content

Ansible role for creating backups of your MySQL databases on the server

License

Notifications You must be signed in to change notification settings

jeroenvandermeulen/ansible-role-backup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skrepr

Ansible Role Backup

Releases LICENSE CI Issues PR Commits Stars Forks

About

This Ansible role is used for deploying a backup script on a Debian server

Ansible Role Ansible Role Ansible Quality Score

Requirements

  • SSH access to the server
  • aws-cli on your computer
  • pip3 install boto3
  • ansible-galaxy collection install community.aws
  • ansible-galaxy collection install amazon.aws

Role Variables

---


customer: yourcustomer # used for naming resources
app: myapplication # Used for naming resources
jira_key: APP # Used for tagging resource in AWS

# S3 settings
aws_profile: default
s3_human_readable_sizes: true

# MySQL database backup options.
backup_mysql_user: backup
backup_mysql_password: y0urverys3curep4ss

# Script settings
retentiontime: 30 days
directory: daily
minimal_backups: 5

# Backup cron job options.
backup_cron_job_state: present
backup_hour: "3"
backup_minute: "00"

# User under which backup jobs will run.
backup_user: root

# Path to where backups configuration will be stored.
backup_path: /{{ backup_user }}/backup

Example Playbook

#!/usr/bin/env ansible-playbook


- hosts: production
  name: Database backup to S3 script
  become: true
  become_user: root

  roles:
    - skrepr.backup

License

MIT / BSD

Author Information

This role was created in 2023 by Jeroen van der Meulen, commisioned by Skrepr

About

Ansible role for creating backups of your MySQL databases on the server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 59.0%
  • Jinja 41.0%