Extend strato backup to collect storage backups.
This commit is contained in:
@@ -23,6 +23,23 @@
|
||||
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
|
||||
loop: "{{ mysql_databases }}"
|
||||
|
||||
@@ -35,9 +35,12 @@ svj-password: !vault |
|
||||
customers:
|
||||
buehler:
|
||||
database: buehler
|
||||
storage: /var/lib/docker/volumes/buehler-tmp_buehler-storage/_data/app/public
|
||||
scheidle:
|
||||
database: scheidle
|
||||
roundcube:
|
||||
database: roundcube
|
||||
svj:
|
||||
database: svj
|
||||
storage: /var/lib/docker/volumes/svj-media/_data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user