galaxyproject / ansible-postgresql

An Ansible role for managing a PostgreSQL server
https://galaxy.ansible.com/galaxyproject/postgresql
122 stars 58 forks source link

backup does not work in general #49

Closed hexylena closed 1 year ago

hexylena commented 1 year ago

backup does not work in general. Look at ansible_postgresql_backup and ansible_postgresql_walbackup variables. It is undefined.

Originally posted by @Valeronlol in https://github.com/galaxyproject/ansible-postgresql/issues/40#issuecomment-1531595306

hexylena commented 1 year ago

hey @valeronlol I cannot confirm this issue.

ansible_postgresql_backup and ansible_postgresql_walbackup which you reference are not variables--they're file names for the cron job storage.

If you set

postgresql_backup_dir: /data/backups
postgresql_backup_local_dir: "{{ '~postgres' | expanduser }}/backups"

then it should be working.