diff --git a/roles/postgres/templates/postgres-backups@.service.j2 b/roles/postgres/templates/postgres-backups@.service.j2 index bd6042c..8952d5b 100644 --- a/roles/postgres/templates/postgres-backups@.service.j2 +++ b/roles/postgres/templates/postgres-backups@.service.j2 @@ -9,4 +9,4 @@ Group = postgres WorkingDirectory = {{ postgres_backups_dir }} ExecStartPre = +/usr/bin/chown postgres:postgres {{ postgres_backups_dir }} ExecStart = /usr/bin/bash -c "/usr/bin/pg_dump --compress=9 --no-owner --format=p --file=%i_$(TZ=UTC date +%%Y%%m%%d-%%H%%M%%S).sql.gz %i" -ExecStartPost = /usr/bin/python /usr/local/bin/rotate.py --keep 30 --dir {{ postgres_backups_dir }} +ExecStartPost = /usr/bin/python3 /usr/local/bin/rotate.py --keep 30 --dir {{ postgres_backups_dir }}