Fix borgmatic PostgreSQL backup and update backup sources #21

Merged
eblume merged 5 commits from feature/improve-borgmatic-backups into main 2026-01-17 09:22:02 -08:00
Owner

Summary

  • Fix PostgreSQL backup failure by adding explicit pg_dump_command path (was failing with "pg_dump: command not found" in LaunchAgent)
  • Remove ~/code/3rd/kiwix-tools from backups (was just symlinks to ZIM archives in transmission)
  • Enable Loki log backup by removing from exclude_patterns

Deployment and Testing

  • Dry run with --check --diff shows expected changes
  • Deploy with mise run provision-indri -- --tags borgmatic
  • Verify config deployed: ssh indri 'cat ~/.config/borgmatic/config.yaml'
  • Run manual backup to test: ssh indri 'mise x -- borgmatic create --verbosity 1'
  • Verify PostgreSQL dump succeeds (no "pg_dump: command not found" error)

🤖 Generated with Claude Code

## Summary - Fix PostgreSQL backup failure by adding explicit `pg_dump_command` path (was failing with "pg_dump: command not found" in LaunchAgent) - Remove `~/code/3rd/kiwix-tools` from backups (was just symlinks to ZIM archives in transmission) - Enable Loki log backup by removing from exclude_patterns ## Deployment and Testing - [x] Dry run with `--check --diff` shows expected changes - [x] Deploy with `mise run provision-indri -- --tags borgmatic` - [x] Verify config deployed: `ssh indri 'cat ~/.config/borgmatic/config.yaml'` - [x] Run manual backup to test: `ssh indri 'mise x -- borgmatic create --verbosity 1'` - [x] Verify PostgreSQL dump succeeds (no "pg_dump: command not found" error) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Add explicit pg_dump_command path to fix "pg_dump: command not found"
  error when running via LaunchAgent (no homebrew in PATH)
- Remove kiwix-tools from backups (was just symlinks, ZIM archives are
  re-downloadable via torrent)
- Enable Loki log backup by removing from exclude_patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pg_dump_command must be nested under each database entry, not at the
top level.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New borgmatic_metrics ansible role:
  - Collects borg repository and archive stats hourly
  - Exports to Prometheus via textfile collector
  - Metrics: repo size, dedup ratio, archive count, last backup stats

- New Grafana dashboard "Borgmatic Backups":
  - Repository status and disk usage
  - Backup size trends over time
  - New data per backup (bar chart)
  - Deduplication ratio
  - Time since last backup with alerting thresholds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update borgmatic-metrics script to collect size per source directory
- Add horizontal bar gauge panel showing backup size by source
- Sources: Pictures, Documents, devpi, Zettelkasten, Forgejo, Loki, PostgreSQL

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
eblume merged commit 3962e5a7de into main 2026-01-17 09:22:02 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!21
No description provided.