Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract correct sizes #29

Open
Janhouse opened this issue Mar 27, 2024 · 2 comments
Open

Extract correct sizes #29

Janhouse opened this issue Mar 27, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Janhouse
Copy link

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. 🤷
image

@ngosang
Copy link
Owner

ngosang commented Aug 16, 2024

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 ngosang closed this as completed Aug 16, 2024
@ngosang ngosang reopened this Aug 16, 2024
@ngosang ngosang added enhancement New feature or request help wanted Extra attention is needed labels Aug 16, 2024
@cz3k
Copy link

cz3k commented Sep 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants