Extract correct sizes
Janhouse opened this issue · 2 comments
Janhouse commented
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:
ngosang commented
I don't know how to improve that. I accept suggestions. The exporter does this:
- List the latest snapshot for each client.
restic snapshots --latest 1 --json
- Get the stats for each snapshot.
restic stats --json f0ba7d59
{
"total_size": 51319171233,
"total_file_count": 24066,
"snapshots_count": 1
}
That's all.
cz3k commented
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.