Is there a way to see snapshot size, repo size, path size, etc?

I can see how large the content size would be if I restored a snapshot. But I’d like to be able to see how much space a particular snapshot is using on the backup disk, and more importantly, how much storage space a particular path is taking up.

I’m not sure what these are called, but what I mean is if I snapshot /home/user/Downloads and I keep X versions of it in history, how much does that total bundle cost me on disk?

Thanks

Because of deduplication, this question unfortunately does not have a precise answer. Given a set of particular snapshots, it’s possible to tell how much unique (logical) space they use together, but because of how packs are organized that’s not going to exactly match the physical space.

In the future it should be able add some tools to approximately calculate this, but as of right now there’s no really good way.

1 Like

Would it make sense to solve the fuzzy nature of this by displaying both shared and unshared space used?

Edit: Shared space would tell the user, if all other data sets were pruned and only this snapshot remained on disk, here’s the total size.

I would love to see this type of thing too. I don’t know how BorgBackup does it but they have a very nicely formatted output of all the info:

------------------------------------------------------------------------------
                       Original size      Compressed size    Deduplicated size
This archive:              266.28 MB            263.98 MB                581 B
All archives:                3.99 GB              3.96 GB            263.19 MB

                       Unique chunks         Total chunks
Chunk index:                     802                11817
------------------------------------------------------------------------------
1 Like

We can absolutely do it, it will be quite complex to compute, but if we can do it efficiently, we should be able to add support for size-based retention, which has requested a few times.

1 Like

For anyone reading this, there’s been an update that adds this.

Computing incremental snapshot size is now possible using kopia snapshot list --storage-stats .

@mattzab I don’t see it in version 0.10.5:

$ kopia --version
0.10.5 build: 512dcebaf4e4dd2b2ed04bfffb340640724f00f6 from: kopia/kopia

$ kopia snapshot list --storage-stats
kopia: error: unknown long flag '--storage-stats', try --help

I used it on a newer build.

 ╭─matt@arch in ~ 
 ╰─λ kopia --version
20220222.0.222148 build: 9d63e56bb9b721eae0bcd7d5006095df108f29ee from: kopia/kopia

I

OK, thank you, I’ll wait for 0.10.6 then, I will try to build it to test with a temporarily repo.