Stats command and raw-data question

It seems unintuitive to me that the default status command shows the total amount that would be restored on disk. Usually it’s a snapshot, and a person only restores the last snapshot anyway, which would not be that size.

Regardless, is there any reason not all the numbers are shown? It would be useful to have raw-data as the default, but why isn’t it all shown with just one command ?

I’m asking because the number really threw me off when I ran it. I thought omg, no way it should be taking this much space.

The numbers are accumulated while walking the snapshots in the repo, but the counting mode is different for each number. For some of the modes, not all directories in the repo need to be walked, so the counting mode is quite different.

By default, the counting mode is “restore size”, and as long as you don’t specify a snapshot, it’ll print the number of bytes restic would need to restore all snapshots. When you run restic stats latest you’ll get the size of the latest snapshot.

Ah, so you mean running all the numbers would take far longer ?

How did you settle on the current number as a default? Seems raw is a more valuable default

The most sensible default depends a lot on the use case :slight_smile:

And yes, computing all the numbers would take longer.