backup: adding condition before setting backup

Signed-off-by: Alexis Pentori <alexis@status.im>
This commit is contained in:
Alexis Pentori 2023-11-16 10:47:28 +01:00
parent 8c10ac4c08
commit 085e30fd75
No known key found for this signature in database
GPG Key ID: 65250D2801E47A10
3 changed files with 10 additions and 0 deletions

View File

@ -31,6 +31,13 @@ postgres_ha_databases:
```
The `user` field is optional. DB name is used by default.
Backup settings can be adjusted using:
```yaml
postgres_ha_backup: false
postgres_ha_backup_frequency: 'weekly'
postgres_ha_backup_timeout: 1200
```
# Management
The service is managed using [Docker Compose](https://docs.docker.com/compose/):

View File

@ -37,6 +37,7 @@ postgres_ha_databases: []
# pass: 'dbpass'
# Backups
postgres_ha_backup: true
postgres_ha_backup_service_name: 'dump-{{ postgres_ha_service_name }}'
postgres_ha_backup_frequency: daily
postgres_ha_backup_timeout: 600

View File

@ -23,4 +23,6 @@
loop_var: db
- import_tasks: consul.yml
- import_tasks: backup.yml
when: postgres_ha_backup