Skip to content

ADR-007 — PBS Backup Visibility in Glance Dashboard

Date: 2026-04-10 Status: Proposed

Decision

Add a backup status overview to the Glance dashboard showing per-service backup health: number of snapshots, most recent backup time, next scheduled run, and backup schedule as a calendar view.

Context

PBS and Databasement both run backups on schedules, but there's no single-pane view of backup health. To check if backups are working, you currently need to:

  • Log into PBS web UI and inspect each backup group
  • Log into Databasement web UI and check each job
  • SSH to cajita-elite and parse logs

This is fragile for a homelab — missed backups can go unnoticed for weeks.

Proposed solution

Glance integration

Add a backup status section to the Glance dashboard with:

Field Source How
Service name Static config Mapped from LXC ID to service name
Last backup time PBS API GET /api2/json/nodes/{node}/storage/{storage}/content?content=backup
Backup count PBS API Count snapshots per VMID
Next scheduled PBS job config Parse cron expression from PBS job definition
Databasement status Databasement API GET /api/v1/jobs for last run status per DB

Calendar view

Display the backup schedule as a calendar widget in Glance showing:

  • Daily 2:00 AM — Databasement DB dumps (all databases)
  • Daily 2:15 AM — Backrest vault snapshot
  • Daily 2:20 AM — Backrest app configs
  • Daily 2:30 AM — Backrest databasement dump snapshot
  • Daily 4:00 AM — PBS critical LXC snapshots (nightly)
  • Weekly Mon 4:00 AM — PBS non-critical LXC snapshots
  • Daily 5:00 AM — PBS prune
  • Saturday 3:00 AM — PBS garbage collection
  • Sunday 6:00 AM — Backrest repo prune
  • 1st of month 7:00 AM — Backrest integrity check

Implementation options

  1. Glance custom widget — Glance supports custom HTML/iframe widgets. Build a lightweight page that queries PBS + Databasement APIs and renders a summary table.
  2. Grafana dashboard embedded in Glance — Create a Grafana dashboard with PBS/Databasement data, embed via iframe. Requires Prometheus exporter for PBS.
  3. N8N automation — N8N workflow polls PBS + Databasement APIs, writes status to a JSON file, Glance reads it via custom widget.

Recommended: Option 1 (custom widget) for simplicity. PBS has a REST API, Databasement has a REST API. A single static HTML page with fetch() calls can render the table.

Trade-offs

Accepted

  • Polling, not push: Glance refreshes on page load. Backup status may be up to 24h stale. Acceptable for a dashboard that's checked occasionally.
  • PBS API auth required: PBS API needs a token. The Glance widget will need credentials — store in Vault, inject via Caddy or a sidecar.

Rejected

  • Ntfy alerts only (no dashboard): Alerts cover failures but don't show overall health. A dashboard provides confidence that the system is working, not just that it hasn't failed.