A Home Assistant custom integration that monitors Duplicacy backups through the duplicacy-exporter Prometheus exporter.
Get real-time backup status, progress, speed, and historical metrics directly in your Home Assistant dashboard.
A running instance of duplicacy-exporter that exposes /metrics (Prometheus format) and /health endpoints.
- Open HACS in Home Assistant.
- Go to Integrations and click the three-dot menu.
- Select Custom repositories.
- Add
https://github.com/GeiserX/duplicacy-hawith category Integration. - Search for "Duplicacy Backup Monitor" and install it.
- Restart Home Assistant.
- Copy the
custom_components/duplicacydirectory into your Home Assistantconfig/custom_components/directory. - Restart Home Assistant.
- Go to Settings > Devices & Services > Add Integration.
- Search for Duplicacy Backup Monitor.
- Enter the URL of your duplicacy-exporter (default:
http://localhost:9750). - The integration will verify the connection and create all entities.
A separate HA device is created for each unique backup job (identified by snapshot ID and storage target). Each device contains all applicable sensors and binary sensors.
| Entity | Description | Unit | Device Class |
|---|---|---|---|
| Last successful backup | Timestamp of the most recent successful backup | - | Timestamp |
| Last backup duration | How long the last backup took | seconds | Duration |
| Backup speed | Current upload speed during a running backup | B/s | Data Rate |
| Backup progress | Current backup completion percentage | % | - |
| Bytes uploaded (last) | Bytes uploaded in the last backup | bytes | Data Size |
| New bytes (last) | New bytes detected in the last backup | bytes | Data Size |
| Total files (last) | Number of files processed in the last backup | - | - |
| New files (last) | Number of new files in the last backup | - | - |
| Last exit code | Exit code of the last backup (0 = success, 1 = failure) | - | - |
| Last revision | Revision number of the last backup | - | - |
| Chunks uploaded | Chunks currently being uploaded | - | - |
| Chunks skipped | Chunks skipped (already present) | - | - |
| New chunks (last) | New chunks created in the last backup | - | - |
| Total bytes uploaded | Cumulative bytes uploaded (monotonically increasing) | bytes | Data Size |
| Last successful prune | Timestamp of the most recent successful prune operation | - | Timestamp |
| Entity | Description | Device Class |
|---|---|---|
| Backup running | Whether a backup is currently in progress | Running |
| Prune running | Whether a prune operation is currently in progress | Running |
automation:
- alias: "Duplicacy backup failed"
trigger:
- platform: state
entity_id: sensor.documents_b2_last_exit_code
to: "1"
action:
- service: notify.mobile_app
data:
title: "Backup Failed"
message: "Duplicacy backup for 'documents' to B2 has failed."automation:
- alias: "Duplicacy no backup in 24h"
trigger:
- platform: template
value_template: >
{{ as_timestamp(now()) - as_timestamp(states('sensor.documents_b2_last_successful_backup')) > 86400 }}
action:
- service: notify.mobile_app
data:
title: "Backup Overdue"
message: "No successful Duplicacy backup for 'documents' to B2 in the last 24 hours."- duplicacy-exporter - The Prometheus exporter this integration connects to
- Duplicacy - Lock-free deduplication cloud backup tool
- HACS - Home Assistant Community Store