hsa-app/internal/storage
Jean-Michel Tremblay fbfdc6877d Add scheduled metadata-only DB backups (spec item 11)
- internal/backup: weekly (configurable) snapshots via the existing VACUUM INTO
  + blob-strip path; restart-safe (only backs up if newest is older than the
  interval), retains BACKUP_KEEP most recent, prunes the rest. Runs in a
  background goroutine; failures are logged, never fatal.
- Config: BACKUP_DIR (./data/backups), BACKUP_INTERVAL (168h; 0 disables),
  BACKUP_KEEP (8).
- Fix: blob-strip now clears attachments.image_data too, not just receipts.
- Fix: STORAGE_DIR is the storage ROOT (default ./data) — receipts/ and
  attachments/ live under it; corrects the doubled-nesting from item 10.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 07:12:50 -04:00
..
lookup.go Initial commit: HSA receipt tracker 2026-06-17 21:40:12 -04:00
query.go Add receipt attachments captured at upload time (spec item 10) 2026-06-19 07:06:15 -04:00
query_test.go Add receipt attachments captured at upload time (spec item 10) 2026-06-19 07:06:15 -04:00
snapshot.go Add scheduled metadata-only DB backups (spec item 11) 2026-06-19 07:12:50 -04:00
snapshot_test.go Add scheduled metadata-only DB backups (spec item 11) 2026-06-19 07:12:50 -04:00
storage.go Add receipt attachments captured at upload time (spec item 10) 2026-06-19 07:06:15 -04:00
storage_test.go Initial commit: HSA receipt tracker 2026-06-17 21:40:12 -04:00