Use complete backup stack and send email to production recipient.
This commit is contained in:
@@ -23,22 +23,22 @@
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
# - name: Backup web directories
|
||||
# shell: tar cvfz {{ backup_dir }}/{{ item.key }}/web-{{ ansible_date_time.iso8601_basic_short }}.tar.gz {{ item.value.storage }}
|
||||
# when: item.value.storage is defined
|
||||
# loop: "{{ lookup('dict', customers) }}"
|
||||
# loop_control:
|
||||
# label: "{{ item.key }}"
|
||||
#
|
||||
# - name: Fetch web backups
|
||||
# fetch:
|
||||
# src: "{{ backup_dir }}/{{ item.key }}/web-{{ ansible_date_time.iso8601_basic_short }}.tar.gz"
|
||||
# dest: "{{ local_backup }}/{{ item.key }}/"
|
||||
# flat: yes
|
||||
# when: item.value.storage is defined
|
||||
# loop: "{{ lookup('dict', customers) }}"
|
||||
# loop_control:
|
||||
# label: "{{ item.key }}"
|
||||
- name: Backup web directories
|
||||
shell: tar cvfz {{ backup_dir }}/{{ item.key }}/web-{{ ansible_date_time.iso8601_basic_short }}.tar.gz {{ item.value.storage }}
|
||||
when: item.value.storage is defined
|
||||
loop: "{{ lookup('dict', customers) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Fetch web backups
|
||||
fetch:
|
||||
src: "{{ backup_dir }}/{{ item.key }}/web-{{ ansible_date_time.iso8601_basic_short }}.tar.gz"
|
||||
dest: "{{ local_backup }}/{{ item.key }}/"
|
||||
flat: yes
|
||||
when: item.value.storage is defined
|
||||
loop: "{{ lookup('dict', customers) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Backup mysql databases
|
||||
shell: docker exec {{ item }}-db mysqldump -u{{ item }} -p{{ lookup('vars', item ~ '-password') }} {{ item }} > {{ backup_dir }}/{{ item }}/db-{{ ansible_date_time.iso8601_basic_short }}.sql
|
||||
|
||||
@@ -45,7 +45,7 @@ customers:
|
||||
storage: /var/lib/docker/volumes/buehler-tmp_buehler-storage/_data/app/public
|
||||
scheidle:
|
||||
database: scheidle
|
||||
email: Christian Steinle <christiansteinle@arcor.de>
|
||||
email: Klaus Scheidle <k.scheidle@scheidle-bauplanung.de>
|
||||
roundcube:
|
||||
database: roundcube
|
||||
svj:
|
||||
|
||||
Reference in New Issue
Block a user