diff --git a/odroid.yaml b/odroid.yaml index 8c9e44f..f6b3caf 100644 --- a/odroid.yaml +++ b/odroid.yaml @@ -10,27 +10,27 @@ - include_vars: vars/variable.yaml - name: Backup mysql databases - shell: docker exec mysql8 mysqldump -u{{ mysql_user }} -p{{ mysql_password }} {{ item }} > /home/chris/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql + shell: docker exec mysql8 mysqldump -u{{ mysql_user }} -p{{ mysql_password }} {{ item }} > {{ backup_dir }}/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql loop: - bookstack - kimai - semaphore - name: Compress mysql backup files - shell: gzip /home/chris/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql + shell: gzip {{ backup_dir }}/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql loop: - bookstack - kimai - semaphore - name: Backup postgres databases - shell: docker exec psql14 pg_dump -U {{ postgres_user }} {{ item }} > /home/chris/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql + shell: docker exec psql14 pg_dump -U {{ postgres_user }} {{ item }} > {{ backup_dir }}/{{ 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 + shell: gzip {{ backup_dir }}/{{ item }}_{{ ansible_date_time.iso8601_basic_short }}.sql loop: - gitea - nextcloud