From 27b113a97f28049ebf49d315bc09ca72d8c56992 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Sat, 17 Jan 2026 08:52:42 -0800 Subject: [PATCH] Fix pg_dump_command placement in borgmatic config pg_dump_command must be nested under each database entry, not at the top level. Co-Authored-By: Claude Opus 4.5 --- ansible/roles/borgmatic/templates/config.yaml.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/borgmatic/templates/config.yaml.j2 b/ansible/roles/borgmatic/templates/config.yaml.j2 index 16ce0e4..6bfb835 100644 --- a/ansible/roles/borgmatic/templates/config.yaml.j2 +++ b/ansible/roles/borgmatic/templates/config.yaml.j2 @@ -35,14 +35,14 @@ keep_yearly: {{ borgmatic_keep_yearly }} {% if borgmatic_postgresql_databases %} # PostgreSQL database backups (streamed via pg_dump) -{% if borgmatic_pg_dump_command is defined %} -pg_dump_command: {{ borgmatic_pg_dump_command }} -{% endif %} postgresql_databases: {% for db in borgmatic_postgresql_databases %} - name: {{ db.name }} hostname: {{ db.hostname | default('localhost') }} port: {{ db.port | default(5432) }} username: {{ db.username }} +{% if borgmatic_pg_dump_command is defined %} + pg_dump_command: {{ borgmatic_pg_dump_command }} +{% endif %} {% endfor %} {% endif %}