What is the difference from stats and stats -mode raw data?

I get very different results with these two commands. What are they showing differently.

[root@X ~]# restic -r b2:Backups:/Restic/X stats
repository 3ba3c39c opened (repository version 2) successfully, password is correct
scanning...
Stats in restore-size mode:
Snapshots processed:   2
   Total File Count:   16630
         Total Size:   100.411 GiB
[root@X~]# nice -n 19 restic -r b2:Backups:/Restic/X stats --mode raw-data
repository 3ba3c39c opened (repository version 2) successfully, password is correct
scanning...
Stats in raw-data mode:
Snapshots processed:   2
   Total Blob Count:   34574
         Total Size:   6.590 GiB

1 Like

The documentation covers this :slight_smile:, the specific section you’re looking for can be found here:
https://restic.readthedocs.io/en/stable/manual_rest.html#getting-information-about-repository-data

1 Like

I’m going to be confused by the documentation. So I guess I’ll just say what I’m wanting to find out and ask what command would do that.

I want to find the total space used by restic for the backups of this server on my b2 bucket.

The doc says:

raw-data counts the size of the blobs in the repository

So the repo size is:

I guess I’m just surprised with this huge amount of size reduction without any compression as this is a version one repo.

Well, it seems there are still some details which needs explaining. :slight_smile:

Observations:

  1. You have not specified the mode, so it defaults to restore-size, meaning the total size of all files, as if you were to restore to an empty directory.
  2. You have not limited what you want to calculate statistics on, so restic will give you statistics for all two snapshots.

If we assume that the diff between the snapshots is small, we can divide 100.411 GiB by two to get the restore-size of ONE snapshot. This means that each snapshot is roughly 50 GiB large.

The difference between 6.590 GiB (the repo size) and 50 GiB is explained by duplicated data in the source files.