The joy of snapshots

Status
Not open for further replies.

MadsRC

Dabbler
Joined
Jul 14, 2013
Messages
20
First, lets start off by saying that I just recovered an important file using snapshots (Thank GOD I enabled them the other day).

What happened is that I was moving some stuff around, and accidently pressed the wrong key combination in my file manager. Whoopsie, and there goes a 15GB wordlist I use everyday... ARGH!

Oh well, Cloned a snapshot take a few minutes ago (Once every 15th minute) and moved the file from the snapshot to it's right place and then destroying the clone.

That got me thinking about the way snapshots work.
From what I understand, when you take a snapshot of Folder A, the "files location" on the disc is marked, and new writes to Folder A won't overwrite the old file in it's "old location" but will instead be written as a new file. Fancy stuff, that's "essentially" free backups.

Now, say I was to change File A inside Folder A after a snapshot was taken. When the next snapshot gets taken, is it then only the difference between the old File A and the new File A, or is it the size of the new File A that that the snapshot will take? or will it take the size of the whole Folder A folder?

Again, say I move File B from Folder B to Folder C, then the next snapshot would have the size of File B, that now is in Folder C, right?

I guess a snapshot is just a "picture of how the filesystem looks at the time of the snapshot" (Hence the name snapshot) and if no files are changed before the next snapshot, the next snapshot won't take any space?

Last question:
How do I interpret the "ZFS Snapshots" of the snapshots settings? "Used" and "refer" what does it represent? original size of the dataset and current size of the snapshot, or? - Say I wanna know how much of my storage is used for snapshots?

Oh, and if I ever meet any of you guys in person, I'll buy you a couple of beers, you're awesome!
 
Status
Not open for further replies.
Top