Duplicated snapshots because of paths
ferrarimarco opened this issue · 1 comments
Hi! Thanks for this exporter.
As explained in #8, restic-exporter calculates its own hash:
restic-exporter/restic-exporter.py
Lines 286 to 288 in a4e37f8
In my setup, using snapshot["paths"]
as part of the input to calculate the hash causes a client to appear multiple times if the paths change, even if the rest (hostname
and username
) stays the same. For example, if you add or remove a path from the ones that restic is backing up for a given host and user, the exporter will report this as two different items.
I was surprised by this behavior because the metrics don't expose the paths for a given snapshot, IIRC.
Thanks for your support!
If you change the path it counts as a different backup, in Restic CLI and in the Exporter. Furthermore, some users have multiple backups per user and there hostname + username is not enough to distinguish backups.
You can remove the old backups (with different path) using the Restic CLI. They will be removed from the exporter too.