Duplicacy-Exporter

Duplicacy-Exporter

Docker app from Florian Dambrine's Repository

Overview

Prometheus exporter for Duplicacy backups. Collect real-time backup progress from logs or receive Duplicacy Web UI reports by webhook, with persistent metrics and an optional storage poller.

duplicacy-exporter

Docker Pulls GitHub Stars Release License

duplicacy-exporter is a Prometheus exporter for Duplicacy backups. It reads the CLI's log or receives the Web UI's report, and exposes progress and speed while a backup runs and the summary when it ends: duration, files, bytes uploaded, exit code and revision, per snapshot, storage and machine. Duplicacy on its own writes logs and sends email, so nothing tells you that last night's backup failed or that one has not run for three days; with the exporter, Prometheus alerts on both and the shipped Grafana dashboard shows every backup on every machine in one place.

The shipped Grafana dashboard while a backup runs: status stats, a progress gauge at 64 percent, upload speed and chunk charts, and the summary of the previous run

Features

  • Watch a backup run: progress, upload speed and chunks uploaded or skipped move on every chunk line of a CLI log that carries section headers.
  • Know how every backup ended: duration, files, bytes uploaded, exit code and revision number, per snapshot, storage target and machine.
  • Alert on a failed or a stale backup with the two Prometheus rules in the docs.
  • Know when the last prune finished, from CLI logs.
  • Two inputs: log_tail for the CLI, from a log file or a container's logs, and webhook for the Web UI's report_url.
  • Readable labels: snapshot id, storage target and machine name come from the log, and IPs or Tailscale names map to names you choose.
  • Values survive a restart: the last completed run is saved to disk and served again on start, so dashboards and Home Assistant sensors never go blank on an upgrade.
  • Storage size and revision counts from an optional poller that runs the bundled duplicacy CLI.
  • A ready-made Grafana dashboard (#25089).
  • One Python file, one dependency, a 39 MB image for amd64 and arm64, or pipx install duplicacy-exporter.

Quick start

Pick the line for your Duplicacy, then check it.

# Duplicacy Web UI: receive the report it posts when a backup ends
docker run -d --name duplicacy-exporter -p 9750:9750 -e MODE=webhook \
  -v duplicacy-exporter-data:/data drumsergio/duplicacy-exporter:0.6.0
# Duplicacy CLI: tail the log your backup job writes
docker run -d --name duplicacy-exporter -p 9750:9750 -e MODE=log_tail \
  -e LOG_FILE=/logs/duplicacy.log -e MACHINE_NAME=$(hostname) -e SNAPSHOT_ID=my-snapshot \
  -v /path/to/duplicacy/logs:/logs:ro -v duplicacy-exporter-data:/data drumsergio/duplicacy-exporter:0.6.0
curl -s localhost:9750/health

curl answers OK, backup series appear on /metrics after the first run ends, and live progress needs the --- Backup -> Primary (<id>) --- headers that duplicacy-cli-cron writes (a plain duplicacy backup log gives the summary only). For the Web UI, set report_url to http://<address of this host>:9750/webhook, because the Web UI container cannot resolve the exporter's container name unless both share a Docker network. Port 9750 has no authentication and /webhook is open in every mode, so publish it only to a network you trust. Then add :9750/metrics to Prometheus and import dashboard 25089; Getting started has the compose files, the PyPI install and the first check.

Documentation

The full documentation is at geiserx.github.io/duplicacy-exporter.

Open an issue for bugs and questions, with the exporter's log at LOG_LEVEL=DEBUG. Report security problems through the security policy, never in a public issue.

Related projects

duplicacy-container (image and Helm chart), duplicacy-cli-cron (scheduled CLI backups whose log this exporter reads), duplicacy-ha (Home Assistant sensors from /metrics), duplicacy-mcp (MCP server).

License

GPL-3.0-or-later

Download Statistics

6,109
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
drumsergio/duplicacy-exporter:latest
Last Updated2026-08-01
First Seen2026-09-21

Runtime arguments

Web UI
http://[IP]:[PORT:9750]/metrics
Network
bridge
Privileged
false

Template configuration

Metrics / Webhook PortPorttcp

HTTP port for /metrics, /health, and the webhook endpoint.

Target
9750
Default
9750
Value
9750
Data DirectoryPathrw

Persistent exporter state and last-seen log timestamp.

Target
/data
Default
/mnt/user/appdata/duplicacy-exporter
Value
/mnt/user/appdata/duplicacy-exporter
Duplicacy Logs DirectoryPathro

Optional host directory containing the Duplicacy log. Required when Mode is log_tail and Log File is used.

Target
/logs
Docker SocketPathro

Optional Docker socket for direct container-log tailing. Clear Log File when using this. WARNING: Docker socket access is highly privileged.

Target
/var/run/docker.sock
Poller Repositories DirectoryPathrw

Optional parent directory containing initialized Duplicacy repositories used by the storage poller. Reference child paths under /repos in Poller Repositories JSON.

Target
/repos
ModeVariable

Collection mode: webhook receives Duplicacy Web UI reports; log_tail parses a shared log file or Docker container logs.

Target
MODE
Default
webhook
Value
webhook
Machine NameVariable

Machine label fallback. Required in log_tail mode unless the log provides a machine name.

Target
MACHINE_NAME
Default
Unraid
Value
Unraid
Log FileVariable

Log path inside the container for shared log-file mode. Clear this field to tail Docker container logs instead.

Target
LOG_FILE
Default
/logs/duplicacy.log
Value
/logs/duplicacy.log
Duplicacy Container NameVariable

Exact name of the Duplicacy container to tail when Mode is log_tail, Log File is empty, and the Docker socket is mounted.

Target
DOCKER_CONTAINER_NAME
Default
duplicacy-cli-cron
Value
duplicacy-cli-cron
Snapshot IDVariable

Optional snapshot label for stock Duplicacy CLI logs that do not contain section headers or DUPLICACY_META.

Target
SNAPSHOT_ID
Webhook PathVariable

HTTP path that receives Duplicacy Web UI report_url POST requests.

Target
WEBHOOK_PATH
Default
/webhook
Value
/webhook
Storage Host MapVariable

Optional JSON object mapping storage hostnames or IP addresses to friendly labels, for example {&quot;192.168.1.20&quot;:&quot;nas&quot;}.

Target
STORAGE_HOST_MAP
Tailscale DomainVariable

Optional Tailscale domain suffix to remove from storage host labels, for example example.ts.net.

Target
TAILSCALE_DOMAIN
Replay HoursVariable

Hours of Docker log history to replay when direct Docker log tailing starts.

Target
REPLAY_HOURS
Default
25
Value
25
Maximum Log BufferVariable

Maximum partial Docker log buffer size in bytes before incomplete data is discarded.

Target
MAX_LOG_BUFFER
Default
1048576
Value
1048576
Log LevelVariable

Logging verbosity: DEBUG, INFO, WARNING, or ERROR.

Target
LOG_LEVEL
Default
INFO
Value
INFO
Persist MetricsVariable

Persist the last completed backup, storage, and prune values so they survive restarts.

Target
PERSIST_ENABLED
Default
true
Value
true
State FileVariable

Metric-state file inside the container. Keep this under the mapped Data Directory.

Target
STATE_FILE
Default
/data/duplicacy_exporter_state.json
Value
/data/duplicacy_exporter_state.json
Persistence IntervalVariable

Seconds between changed-state snapshots.

Target
PERSIST_INTERVAL
Default
15
Value
15
Enable Storage PollerVariable

Enable Duplicacy list/check polling for storage-size and revision metrics. Requires initialized repositories and credentials.

Target
POLLER_ENABLED
Default
false
Value
false
Poller RepositoriesVariable

JSON list of repositories, for example [{&quot;path&quot;:&quot;/repos/photos&quot;,&quot;storage&quot;:&quot;default&quot;,&quot;snapshot_id&quot;:&quot;photos&quot;}].

Target
POLLER_REPOSITORIES
Poller IntervalVariable

Seconds between storage-poller cycles. The default is 24 hours.

Target
POLLER_INTERVAL
Default
86400
Value
86400
Poller TimeoutVariable

Per-command timeout in seconds for Duplicacy list and check operations.

Target
POLLER_TIMEOUT
Default
1800
Value
1800
Duplicacy BinaryVariable

Duplicacy executable used by the storage poller. The upstream image bundles this binary.

Target
DUPLICACY_BIN
Default
duplicacy
Value
duplicacy