Restic restoring how does it work internaly

Hi,

I read the technical documentation about Restic, however I am still not sure how does it work when restoring an folder. What does restic do; read indexes ? fetch all non deleted files ?

I would like to understand how it works internally in order to reason about performances on folder with very long history and size between 50go-100go.

Regards,

Alois

In short: restic reads the snapshot-to restore and all contained dirs (this information is usually available in the cache). Then it determines which blobs and packs it needs to access in order to do the restore (this involves reading the index which is loaded at program start, usually also from the cache). And then it reads the packs from the backend and distributes the contents to the files.

History doesn’t matter at all for the restore as the data structure is non-incremental. restic always saves complete snapshots, follow-up backups are fast due to the usage of a parent snapshot and due to the deduplication of the data, but always yield a complete backup snapshot.