1
0
Fork 0
mirror of https://github.com/roles-ansible/role-postgresql-backup.git synced 2024-08-16 10:19:49 +02:00

fix error

This commit is contained in:
L3D 2020-07-21 18:56:17 +02:00 committed by L3D
parent e159d2c070
commit f69ea6a30a
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ backup_databases() {
if (umask 077 && pg_dump -F {{ postgresql_backup.export_option | string }} -h "{{ db.host | default( 'localhost' ) }}" -U "{{ db.user | default( 'postgres' ) }}" -p "{{ db.port | default( '5432' ) }}" "{{ db.name }}" -f "{{ db.name }}.in_progress.psql"); then if (umask 077 && pg_dump -F {{ postgresql_backup.export_option | string }} -h "{{ db.host | default( 'localhost' ) }}" -U "{{ db.user | default( 'postgres' ) }}" -p "{{ db.port | default( '5432' ) }}" "{{ db.name }}" -f "{{ db.name }}.in_progress.psql"); then
{% if postgresql_backup.create_tar_gz %} {% if postgresql_backup.create_tar_gz %}
mv "{{ db.name }}.in_progress.psql" "{{ db.name }}.psql" mv "{{ db.name }}.in_progress.psql" "{{ db.name }}.psql"
tar -czvf "{{ db.name }}.psql.tar.gz" "{{ db.name }}.in_progress.psql" tar -czvf "{{ db.name }}.psql.tar.gz" "{{ db.name }}.psql"
rm "{{ db.name }}.psql" rm "{{ db.name }}.psql"
{% else %} {% else %}
mv "{{ db.name }}.in_progress.psql" "{{ db.name }}.psql" mv "{{ db.name }}.in_progress.psql" "{{ db.name }}.psql"

View file

@ -17,5 +17,5 @@ _postgresql_backup:
databases: [] databases: []
# versionscheck # versionscheck
playbook_version_number: 23 # should be int playbook_version_number: 24 # should be int
playbook_version_path: 'role-postgresql-backup_roles-ansible_github.com.version' # unique string playbook_version_path: 'role-postgresql-backup_roles-ansible_github.com.version' # unique string