backup: fix location of backup directory
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
d257729557
commit
dd12ecd90a
|
@ -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'
|
||||
|
|
|
@ -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 }}" \
|
||||
|
|
Loading…
Reference in New Issue