cancel
Showing results for 
Search instead for 
Did you mean: 
sonu_2311
Mission Specialist
Mission Specialist
  • 3,073 Views

MySQL Database Backup with Ansible

Jump to solution

Hi Team,

Please any one can guide me how to take the MySQL Database backup using Ansible.

 

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
magnuz
Mission Specialist
Mission Specialist
  • 3,061 Views

Hi @sonu_2311 ,

You can perform a dump using the mysql_db module. To perform a dump of a mysql db called db1:

- name: Dump database db1
  mysql_db:
    state: dump
    name: db1
    target: /tmp/dump.sql


For further details please visit the Ansible documentation of this module.

Regards,

View solution in original post

0 Kudos
2 Replies
magnuz
Mission Specialist
Mission Specialist
  • 3,062 Views

Hi @sonu_2311 ,

You can perform a dump using the mysql_db module. To perform a dump of a mysql db called db1:

- name: Dump database db1
  mysql_db:
    state: dump
    name: db1
    target: /tmp/dump.sql


For further details please visit the Ansible documentation of this module.

Regards,

0 Kudos
sonu_2311
Mission Specialist
Mission Specialist
  • 3,037 Views

Thanks. Its worked.

0 Kudos
Join the discussion
You must log in to join this conversation.