Tasks for backing up postgres databases.

This commit is contained in:
2021-11-17 11:32:53 +01:00
parent 5b4c4226ff
commit f6a1e30a9a

View File

@@ -21,4 +21,16 @@
- bookstack
- kimai
- semaphore
- name: Backup postgres databases
shell: docker exec psql14 psql14 -U {{ postgres_user }} {{ item }} > /home/chris/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql
loop:
- gitea
- nextcloud
- name: Compress postgres backup files
shell: gzip /home/chris/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql
loop:
- gitea
- nextcloud