From be688bd10d964d97ae5d88675230e9a1ee3d3d88 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Mon, 19 Jan 2026 17:51:52 -0800 Subject: [PATCH] Configure borgmatic to backup k8s-pg PostgreSQL - Add k8s-pg database entry to borgmatic config - Add k8s-pg entry to pgpass for borgmatic access Co-Authored-By: Claude Opus 4.5 --- ansible/roles/borgmatic/defaults/main.yml | 6 ++++++ ansible/roles/postgresql/tasks/main.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/ansible/roles/borgmatic/defaults/main.yml b/ansible/roles/borgmatic/defaults/main.yml index 0189321..8fae283 100644 --- a/ansible/roles/borgmatic/defaults/main.yml +++ b/ansible/roles/borgmatic/defaults/main.yml @@ -45,7 +45,13 @@ borgmatic_keep_yearly: 1000 # pg_dump_command must be full path since LaunchAgent doesn't have homebrew in PATH borgmatic_pg_dump_command: /opt/homebrew/opt/postgresql@18/bin/pg_dump borgmatic_postgresql_databases: + # Brew PostgreSQL on indri (current production) - name: miniflux hostname: localhost port: 5432 username: borgmatic + # k8s PostgreSQL (CloudNativePG) - backup both during migration + - name: miniflux + hostname: k8s-pg.tail8d86e.ts.net + port: 5432 + username: borgmatic diff --git a/ansible/roles/postgresql/tasks/main.yml b/ansible/roles/postgresql/tasks/main.yml index 851a01e..c79ffd5 100644 --- a/ansible/roles/postgresql/tasks/main.yml +++ b/ansible/roles/postgresql/tasks/main.yml @@ -184,6 +184,7 @@ content: | # Managed by ansible - only read-only roles localhost:{{ postgresql_port }}:*:borgmatic:{{ postgresql_user_passwords['borgmatic'] }} + k8s-pg.tail8d86e.ts.net:5432:*:borgmatic:{{ postgresql_user_passwords['borgmatic'] }} dest: ~/.pgpass mode: '0600' no_log: true