Giter Site home page Giter Site logo

ansible-role-database-dump's Introduction

MySQL Backup Role

=========

This Ansible role is used for creating MySQL/MariaDB database backups, managing the backup directory, and optionally transferring the latest backup to the Ansible controller machine.

Requirements

  • Ansible 2.9 or higher
  • community.mysql collection

Role Variables

The role uses the following variables which you can also override:

  • db_type: The type of the database, mysql or mariadb.
  • mysql_package_name: The package name for MySQL client utilities.
  • mariadb_package_name: The package name for MariaDB client utilities.
  • backup_path: The path where backups should be stored on the target machine.
  • database_user: The user for connecting to the database.
  • database_group: The group for file permissions in the backup directory.
  • database_name: The name of the database to backup.
  • cron_minute: The minute when the cron job should run.
  • cron_hour: The hour when the cron job should run.
  • dump_execute_now: Whether to execute a database dump immediately.
  • local_backup: Whether to fetch the latest dump to the local machine.
  • local_backup_path: The local path where the backup should be stored.

Dependencies

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook

  • hosts: debian11-test gather_facts: yes become: yes vars_files:

    • ../secrets-infra-lm.yml vars: local_backup: true dump_execute_now: true cron_minute: '0' cron_hour: '2' database_user: zabbix database_name: "zabbix-server" database_password: "{{ zabbix_server_dbpassword }}"

    roles:

    • mysql-dump

License

BSD

Author Information

This role was created in 2023 by Karim BAIDI.

ansible-role-database-dump's People

Contributors

babidi34 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.