diff --git a/defaults/main.yml b/defaults/main.yml index 22c6d1d..f291a14 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -37,7 +37,7 @@ postgres_ha_databases: [] # pass: 'dbpass' # Backups -postgres_ha_backup_service_name: 'dump-{{ postgres_ha_service_name }}-db' +postgres_ha_backup_service_name: 'dump-{{ postgres_ha_service_name }}' postgres_ha_backup_frequency: daily postgres_ha_backup_timeout: 600 postgres_ha_backup_user: 'root' diff --git a/tasks/backup.yml b/tasks/backup.yml index 8004bea..e87a6a5 100644 --- a/tasks/backup.yml +++ b/tasks/backup.yml @@ -3,7 +3,7 @@ include_role: name=systemd-timer vars: systemd_timer_name: '{{ postgres_ha_backup_service_name }}' - systemd_timer_description: 'Dump Telemetry PostgreSQL database.' + systemd_timer_description: 'Dump High-Availability PostgreSQL database.' systemd_timer_user: '{{ postgres_ha_backup_user }}' systemd_timer_frequency: '{{ postgres_ha_backup_frequency }}' systemd_timer_timeout_sec: '{{ postgres_ha_backup_timeout }}' @@ -11,7 +11,7 @@ systemd_timer_start_on_creation: false systemd_timer_script_content: | #!/usr/bin/env bash - BKP_DIR="{{ postgres_ha_cont_data_vol }}/backup/{{ postgres_ha_db_name }}" + BKP_DIR="{{ postgres_ha_cont_backup_vol }}" rm -vfr "${BKP_DIR}" /usr/bin/docker exec -i {{ postgres_ha_cont_name }} \ pg_dump -F directory -f "/backup/{{ postgres_ha_db_name }}" \