[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Explaining snapshots (for backup)



Am 15.11.2022 um 15:27 schrieb rhkramer@gmail.com:
> I'm not really clear on the concept of a snapshot (for backup) -- I've done a 
> little googling but haven't found an explanation that "satisfies" me.

I am familiar with snapshots on zfs. There might be different meanings
in other contexts, idk ...

zfs is s COW filesystem, meaning "copy-on-write". Whenever you write to
an already existing block (piece of a file), a new block gets created
(copied and modified) and on closing the write (or on sync), the
(metadata-) pointer/directory entry changes to point to the new block.
This algorithm primarily implements transactions on the filesystem to
garantee, it has a consistent state at all times. but one side effect
is, that the old filesystem state still hangs around. And a snapshot
basically points to that outdated state of a filesystem and keeping a
shapshot means to prevent the reuse of those blocks until the snapshot
gets freed up again.

Does that help your understanding?


Reply to: