f704a78029
blueprint database-backup-recovery Introduce a new option, mariadb_backup, which takes a backup of all databases hosted in MariaDB. Backups are performed using XtraBackup, the output of which is saved to a dedicated Docker volume on the target host (which defaults to the first node in the MariaDB cluster). It supports either full (the default) or incremental backups. Change-Id: Ied224c0d19b8734aa72092aaddd530155999dbc3
20 lines
596 B
YAML
20 lines
596 B
YAML
---
|
|
- name: Taking {{ mariadb_backup_type }} database backup via XtraBackup
|
|
kolla_docker:
|
|
action: "start_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
image: "{{ xtrabackup_image_full }}"
|
|
name: "xtrabackup"
|
|
restart_policy: "never"
|
|
remove_on_exit: True
|
|
environment:
|
|
BACKUP_TYPE: "{{ mariadb_backup_type }}"
|
|
volumes:
|
|
- "{{ node_config_directory }}xtrabackup:/etc/mysql:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "mariadb_backup:/backup"
|
|
volumes_from:
|
|
- "mariadb"
|
|
when:
|
|
- inventory_hostname == mariadb_backup_host
|