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

remove compress option because it is useless

This commit is contained in:
L3D 2020-07-09 10:51:31 +02:00 committed by L3D
parent 00e4de0225
commit 7fa78545ae
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
3 changed files with 1 additions and 6 deletions

View file

@ -10,7 +10,6 @@ postgresql_backup:
user: root
cron_minute: '*'
cron_hour: '0'
compress: false
databases: []
# - name: psql_database_name
# user: psql_database_user

View file

@ -19,11 +19,7 @@ backup_databases() {
export PGPASSWORD="{{ db.password }}"
{% endif %}
if (umask 077 && pg_dump -F c -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.compress %}
tar -czvf "{{ db.name }}.psql.tar.gz" "{{ db.name }}.in_progress.psql"
{% else %}
mv "{{ db.name }}.in_progress.psql" "{{ db.name }}.psql"
{% endif %}
echo "backup of {{ db.name }} successful"
else
echo "failed to export {{ db.name }}"

View file

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