Restic stats showing tenfold size after compression

Hey,
I just upgraded my first repository to v2 with compression.

Heres a stats run before:

$ restic stats  # this is 0.12.0
repository 9f3290b9 opened successfully, password is correct
scanning...
Stats in restore-size mode:
Snapshots processed:   293
   Total File Count:   4891997
         Total Size:   52.089 GiB

I then updated restic and converted to compressed (didn’t save the output unfortunatly):

$ restic self-update
$ restic migrate upgrade_repo_v2
$ restic prune --compression max --repack-uncompressed

And afterwards I get a tenfold size in stats, which might be the size of all snapshots combined?

$ restic stats  # this is 0.14.0
repository 9f3290b9 opened (repository version 2) successfully, password is correct
scanning...
Stats in restore-size mode:
Snapshots processed:   293
   Total File Count:   4891997
         Total Size:   532.673 GiB

Did the restore-size calculation change between the version? docs look the same to me.

What you’re seeing is the result of Fix restore size calculation for multiple snapshots by MichaelEischer · Pull Request #3740 · restic/restic · GitHub which has fixed the size calculation of restic stats. The size reported in restic 0.12.0 is simply wrong.

Edit: the restore-size mode should by definition sum up the restore size of each individual snapshot. But before restic 0.14.0, lots of files were skipped during that calculation.

1 Like

Thank you for the clarification!