Extend strato-production to fetch backups.

This commit is contained in:
2024-02-24 09:34:41 +01:00
parent 88f55f4e39
commit 28a34630ef
2 changed files with 10 additions and 0 deletions

View File

@@ -36,6 +36,15 @@
shell: gzip {{ backup_dir }}/{{ item }}/db-{{ ansible_date_time.iso8601_basic_short }}.sql
loop: "{{ databases }}"
- name: Fetch database backups
fetch:
src: "{{ backup_dir }}/{{ item.key }}/db-{{ ansible_date_time.iso8601_basic_short }}.sql.gz"
dest: "{{ local_backup }}/{{ item.key }}/"
flat: yes
loop: "{{ lookup('dict', customers) }}"
loop_control:
label: "{{ item.key }}"
- name: Inform Mattermost about success
uri:
url: "{{ mattermost_url }}"

View File

@@ -2,6 +2,7 @@ backup_dir: /media/backup/strato-production
systems: ['buehler', 'scheidle', 'mailserver', 'roundcube', 'svj']
databases: ['buehler', 'scheidle', 'roundcube', 'svj']
mysql_databases: ['buehler', 'scheidle', 'roundcube', 'svj']
local_backup: /home/semaphore/backup
buehler-password: !vault |
$ANSIBLE_VAULT;1.1;AES256
37306230376433313631326230313739396238666239323362366164363831643664306535346464