Sure, if you're going to implement this now, it will look a bit ugly since older snapshots won't yet have this information. Why not simply add this information as a string to the snapshot in the repo? This information could be then easily added as to the result set of the snapshot command, as an additional column called "Reported snapshot size".
Already today, restic calculates the size of the snapshot after each backup run. Having said that, what most people have asked for here is a lot simpler than that. So, maybe stat (or a slightly simpler version of it) could in fact be added as a flag to the snapshots command, properly documented as something that should be used only when absolutely necessary. Still, there may be situations, as the ones described by other people here, where this information would be so important to me that I'd be willing to wait even 2 hours for a result. So, adding it to the snapshots command by default is going to make it extremely slow. It's understood that calculating the size of a snapshot is expensive. In the case of frequent minor changes to a large sqlite file: is restic actually able to reuse parts of it from previous snapshots? How much? - or can you already answer this question using existing tools? It would be nice if you could use a (hypothetical) restic equivalent to figure out if it's actually handling that pathological case well.
BACKUPLOUPE PLUS
On the plus side, the backup target is a regular(ish) directory, so you can open and inspect it with your regular tools.
It's got some similarities to rsync, if you squint right.
BACKUPLOUPE FULL
1 bit changed in a file (and timestamp updated): same, full new copy in the backup (the pathological case for Time Machine is a large sqlite3 file with frequent, small changes). Renaming a file leads to an entire new copy being stored in the backup. $ time du -sh /Volumes/ex1806/Backups.backupdb/my-machine/-195712/Macintosh\ HD\ -\ Data/Users/hraban/ġ64G /Volumes/ex1806/Backups.backupdb/my-machine/-195712/Macintosh HD - Data/Users/hraban/Ĭontext, for those unfamiliar with mac's time machine: time machine uses filenames as keys and does no content inspection at all.