20 lines
827 B
YAML
20 lines
827 B
YAML
- name: Create backup streaming config dir
|
|
file:
|
|
path: /etc/borg-streams
|
|
state: directory
|
|
|
|
# NOTE(ianw) 2021-06-09 : we don't also keep an on-disk backup as we
|
|
# did for the old mysql instance above because it's easy to restore
|
|
# from borg now (in the past with bup it was a real pain to extract
|
|
# data so it was worth managing on-disk copies to possibly avoid that).
|
|
#
|
|
# # borg-mount <backup-server>
|
|
# the dump file will be under
|
|
# /opt/backups/review02-mariadb-<date>T<time>/mariadb
|
|
- name: Create mariadb streaming file to setup mariadb backup jobs
|
|
copy:
|
|
content: >-
|
|
/usr/local/bin/docker-compose -f /etc/gerrit-compose/docker-compose.yaml exec -T mariadb
|
|
bash -c '/usr/bin/mysqldump --all-databases --single-transaction -uroot -p"$MYSQL_ROOT_PASSWORD"'
|
|
dest: /etc/borg-streams/mariadb
|