I couldn't find a Home Assistant integration for Backrest, so I built one [HACS]

Backrest for Home Assistant

I run Backrest on my homelab and wanted all my backup stats on my Home Assistant
dashboard alongside everything else. Went looking for an existing integration,
couldn’t find one so I built it myself.

For anyone who doesn’t know, Backrest
is a self-hosted UI and scheduler for restic backups. If you’re using it to manage
your backups, you can now pull everything into Home Assistant.


What you get

Per-plan sensors

  • Last Backup Time & Status (Success / Warning / Error / Cancelled)
  • Last Backup Duration
  • Bytes Added & New Files (last backup)
  • Bytes Added & Backup Count (last 30 days)
  • Failure Count (30 days)
  • Next Scheduled Backup
  • Hours Since Last Backup

Binary sensors

  • Backup Running
  • Backup Stale (configurable threshold per plan)
  • Last Backup Failed

Buttons

  • Trigger Backup
  • Apply Retention Policy
  • Run Prune / Integrity Check / Refresh Stats / Unlock Repository

Some automations you could build with this

  • Push notification when a backup fails
  • Alert when a plan hasn’t run in over 25 hours
  • Trigger a backup before a planned shutdown or power cut

Installation

  1. Add this as a custom repository in HACS:
    https://github.com/vakhariaheet/backrest-hacs
  2. Install Backrest Backup Manager
  3. Restart Home Assistant
  4. Settings → Devices & Services → Add Integration → Backrest

Works with both authenticated and no-auth Backrest setups. HTTP and HTTPS supported.


Links

Still early days so feedback is very welcome especially if your setup looks
different from mine. Happy to fix things.

1 Like