Hello @MichaelEischer thanks for responding. What I mean is when I run du -sh , on each snapshot directory, the space consumed is the same. If restic does a deduplication, the disk space consumed by each snapshot directory should not be the size of a full backup, don’t you agree?
I’ve moved the post into a new topic.
That’s still not enough context to make the question comprehensible. What is “each snapshot directory”? The repository only contains a
snapshots folder, but running
du -sh on that doesn’t make sense. And
restic mount creates a virtual filesystem which cannot be mapped to disk space consumed by the repository.
I think you are mixing different levels of abstraction:)
So let’s say I created new snapshot - 100GB of data
then next snapshot but 50GB changed - so only 50GB will be transferred to repo.
Now I mount my repo and indeed
du -sh of snapshot1 or snapshot2 are both 100 GB. They are not made of the same data but if you try to restore them, either will take 100GB.
du -sh shows you is how much data is included in given snapshot. If I take snapshot3 with no data changed it will be still 100GB…
Snapshot represents data at specific time - what is behind is indeed black magic of deduplication so 3 snapshots in my example only take 150GB of repo size. But each of them is 100GB
When I run restic -r /restic mount /mnt and then I navigate in /mnt/snapshots, I tried to run du -sh on the directories inside snapshots folder, and they have big sizes. I thought that with the deduplication process the sizes would be much less than they are. Take a look at the attached image.
Yes. mount is another abstraction layer. It is
virtual disk. It does not tell you how much delta data is stored in repo for given snapshot but what is all data size included in snapshot.
There is no bug or error here:) Take your time to think about it. However confusing, it is 100% logical.
Let’s say I take snapshot of the same dataset again and again (no data change) - would you expect
du -sh to show zero?
du -sh is supposed to tell you how much space data occupies. And any snapshot in this example occupies the same space - let’s say 100GB. When you copy it to local disk you need 100GB free space. Not zero.