I’m new to
I’m confused about the
restic philosophy. I’ve read several posts which seem to consider every snapshot as a full backup, independently off other previous ones.
But in the documentation, I can read:
restic encounters a file that has already been backed up, whether in the current backup or a previous one, it makes sure the file’s content is only stored once in the repository
So, it seems the current snapshot could be depending on the previous one, and is not independent from the other ones.
Any hint ?
Thanks a lot.
The snapshots does not depend on each other. The thing about every snapshot being considered a full backup is simply because each snapshot references all of the data that was backed up at the time of that snapshot. Regardless of whether that specific backup run had to upload all the files you backed up, or only the parts of them that changed since last time.
When a file is backed up, it is split into many small chunks, and the chunks are then uploaded to the repository and stored there (after deduplication, compression and encryption). However, identical chunks that have already been uploaded previously will not be uploaded again, as they are already in the repository. The snapshot created from the new backup then (simplified explanation) references a backed up file’s contents by referencing these chunks that were backed up for the file.
This has the benefit that multiple snapshots can reference the same file contents (or even just parts of a file, if a file changed only partially since the last backup), but the actual file data is only stored once.
So in summary, each snapshot represents everything you backed up, even if the actual data is only stored once and used by multiple snapshots. But the snapshots don’t depend on each other - if one of more snapshots that reference a file is removed, the other snapshots will still reference the file’s content, until no other snapshots reference this data any more (it can then be removed using the
@rawtaz Thanks a lof for the info.
@rawtaz Thanks a lot for the explanation.That makes sense.