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:
parent
00e4de0225
commit
7fa78545ae
3 changed files with 1 additions and 6 deletions
|
@ -10,7 +10,6 @@ postgresql_backup:
|
|||
user: root
|
||||
cron_minute: '*'
|
||||
cron_hour: '0'
|
||||
compress: false
|
||||
databases: []
|
||||
# - name: psql_database_name
|
||||
# user: psql_database_user
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue