refs #8414 - modify maribackup config files and templates #56

Merged
xavi merged 17 commits from 8414_MariaDBBackup_custom_environment into main 2025-01-30 07:05:02 +00:00
1 changed files with 25 additions and 2 deletions
Showing only changes of commit d1ec1bc57b - Show all commits

View File

@ -71,7 +71,7 @@
# mode: u=rw,g=r,o=r
- name: Insert MySQL certificates
#no_log: true
no_log: true
copy:
content: "{{ item.content }}"
dest: "{{ item.dest }}"
@ -104,7 +104,7 @@
- /mnt/local-backup
Make sure they are correctly configured and accessible.
- when: production is false
- when: production is false or production is not defined
block:
- name: Set MariaDB custom configuration Test-DB-DEV
@ -157,3 +157,26 @@
owner: root
group: root
mode: u=rw,g=,o=
- name: Check if /var/lib/mysql/ exists
stat:
path: /var/lib/mysql/
register: mysql_dir
- when: mysql_dir.stat.exists
block:
- name: Sync MySQL data directory
synchronize:
src: /var/lib/mysql/
dest: /mnt/mysqldata/mysql/
archive: true
compress: true
recursive: true
delegate_to: "{{ inventory_hostname }}"
- name: Remove old MySQL data after sync
file:
path: /var/lib/mysql/
state: absent