diff --git a/strato-production.yaml b/strato-production.yaml index 56e4665..a6168f9 100644 --- a/strato-production.yaml +++ b/strato-production.yaml @@ -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 }}" diff --git a/vars/strato-production.yaml b/vars/strato-production.yaml index 62268c8..a59f42f 100644 --- a/vars/strato-production.yaml +++ b/vars/strato-production.yaml @@ -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