The global stats introduced in 01b0b14 require that the underlying restic repository have been created or migrated to the version 2 data format, AND have compression actually enabled.
- For repos that are still version 1, the
restic stats --mode raw-data response lacks the total_uncompressed_size key and the exporter fails with
Unable to collect metrics from Restic. KeyError: 'total_uncompressed_size'
Migrating to v2 is fairly easy (restic migrate upgrade_repo_v2), but the exporter's error could be more verbose.
- Once migrated to v2,
restic stats --mode raw-data still lacks a few new fields. These stats will only appear after a backup with --compression max has been performed at least once.