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
- Add this as a custom repository in HACS:
https://github.com/vakhariaheet/backrest-hacs - Install Backrest Backup Manager
- Restart Home Assistant
- Settings → Devices & Services → Add Integration → Backrest
Works with both authenticated and no-auth Backrest setups. HTTP and HTTPS supported.
Links
- GitHub: GitHub - vakhariaheet/backrest-hacs: Home Assistant integration for Backrest — monitor and control restic backups · GitHub
- Issues / feature requests: GitHub · Where software is built
- Backrest: GitHub - garethgeorge/backrest: Backrest is a web UI and orchestrator for restic backup. · GitHub
Still early days so feedback is very welcome especially if your setup looks
different from mine. Happy to fix things.