fix(sys-svc-rdbms): seed dedicated databases into the backup, not just central ones

baudolo dumps only what databases.csv names, and the entry was seeded from the central branch alone. An application running its own engine - Discourse with svc-db-postgres absent from the group - therefore never reached the seed: databases.csv stayed empty, baudolo warned that it was continuing without dumps, and the volume was stored as a raw PGDATA tree that restores a torn cluster.

Whether a database must be backed up is a property of there being one, not of it being central, so both branches now include the same helper with their own gate: centrally the host from the provider group seeds, dedicated the stack host itself. The coordinates come from the same lookup either way.

Verified without a deploy that the row this writes is the row baudolo looks for: the seed records the consumer entity as the instance, and baudolo derives the same key from the container name (discourse-database -> discourse). A mismatch there would have filled databases.csv and still produced no dump.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-08-18 03:22:04 +02:00
1 parent cab5e2523f
commit 7d044c2652
3 files changed
+19 -1

No files matched your search

+6
View File
@@ -14,3 +14,9 @@
- name: "🔧 For '{{ application_id }}/{{ _database_consumer_id }}': Apply postgres setup"
include_tasks: dedicated_postgres.yml
when: _database_type == 'postgres'
- name: "🔧 For '{{ application_id }}/{{ _database_consumer_id }}': Seed the backup entry"
include_tasks: utils/seed_backup.yml
when:
- "'svc-bkp-volume-2-local' in group_names"
- IS_STACK_HOST | bool
+1 -1
View File
@@ -44,7 +44,7 @@
database_consumer_id: "{{ _database_consumer_id }}"
- name: "➕ For '{{ application_id }}': Add Entry for Backup Procedure"
include_tasks: "{{ lookup('path_absolute', 'roles/svc-bkp-volume-2-local/tasks/03_seed-database-to-backup.yml') }}"
include_tasks: utils/seed_backup.yml
when:
- "'svc-bkp-volume-2-local' in group_names"
- IS_STACK_HOST | bool
@@ -0,0 +1,12 @@
---
- name: "➕ For '{{ application_id }}/{{ _database_consumer_id }}': Add Entry for Backup Procedure"
include_tasks: "{{ lookup('path_absolute', 'roles/svc-bkp-volume-2-local/tasks/03_seed-database-to-backup.yml') }}"
vars:
database_consumer_id: "{{ _database_consumer_id }}"
database_type: "{{ _database_type }}"
database_instance: "{{ lookup('database', _database_consumer_id, 'instance') }}"
database_host: "{{ lookup('database', _database_consumer_id, 'host') }}"
database_port: "{{ lookup('database', _database_consumer_id, 'port') }}"
database_name: "{{ lookup('database', _database_consumer_id, 'name') }}"
database_username: "{{ lookup('database', _database_consumer_id, 'username') }}"
database_password: "{{ lookup('database', _database_consumer_id, 'password') }}"