Sizes on Backup source and target

Hello,
I am using restic for some weeks now. First of all - thank you so much for this wonderful peace of software. I really enjoy using it.

I would like to ask the following:
I am backing up a centos machine with only one partition. “df -h” shows me 442G used on “/”. Backup target is a “Storagebox” Product from hetzner via SFTP. Everything works fine, no errors as I watched the backup in verbose mode.

The command I run is
restic -q backup --one-file-system --exclude="/tmp/" --exclude="/var/tmp/" --exclude="/var/cache/*" /

The interesting thing is that hetzner says in their customer interface that I use 362G. So much much less than used size of backup source (442G). The excluded directories make just a few MBytes, so that should not count in that case.

How can that be? Should I panic?
I have to say that there might be a lot of duplicate files in different locations within the filesystem. Could it be that restic deduplicates them and could this lead to this huge difference?

Thank you,
Michael

1 Like

No need to panic. What you are seeing is most probably restic doing its job with deduplication. If you want to make sure you can use restic stats to see the size required to restore the repository with all snapshots, or use restic stats [snapshot-ID] to see the size required to restore a specific snapshot.

restic does a pretty good job at detecting if the repository is in a healthy state. If you want to make sure you can always run restic check (or restic check --read-data) to detect any corruption of the repository.

2 Likes