restic-exporter icon indicating copy to clipboard operation
restic-exporter copied to clipboard

Extract correct sizes

Open Janhouse opened this issue 11 months ago • 2 comments

Would it be possible to extract correct bytes-added and size-on-disk for the backups? Restic does deduplication and compression and this exporter doesn't seem to take any of that into account. It appears to look at each backup separately and then sum all of that.

Here is a screenshot from Backrest making the actual backups: image

While this exporter just doubles it. :shrug: image

Janhouse avatar Mar 27 '24 15:03 Janhouse

I don't know how to improve that. I accept suggestions. The exporter does this:

  1. List the latest snapshot for each client. restic snapshots --latest 1 --json
  2. Get the stats for each snapshot. restic stats --json f0ba7d59
{
  "total_size": 51319171233,
  "total_file_count": 24066,
  "snapshots_count": 1
}

That's all.

ngosang avatar Aug 16 '24 09:08 ngosang

At repo level you could achieve this with restic stats --json --mode raw-data. Restic docs > Getting information about repository data.

{
  "total_size":5858775049,
  "total_uncompressed_size":7243990758,
  "compression_ratio":1.2364343565702245,
  "compression_progress":100,
  "compression_space_saving":19.122273278306135,
  "total_blob_count":12455,
  "snapshots_count":101
}

@ngosang Thanks for creating the project! It has helped me a lot to get up and running quickly.

cz3k avatar Sep 10 '24 13:09 cz3k