Tasks for backing up postgres databases.
This commit is contained in:
12
host.yaml
12
host.yaml
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user