ZFS: Which files are lost when a snaphot is destroyed?

Status
Not open for further replies.

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
Hi folks
I am looking for a way to determine which files are affected or lost when a specific ZFS snaphot is deleted / destroyed. So this must be these files which are only referenced by this snapshot.
Any ideas ?
 

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
diff with what?
In my understanding, diff shows the difference between two snapshots but I want to know which files are referenced by a specific snapshot only.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
diff with what?
In my understanding, diff shows the difference between two snapshots but I want to know which files are referenced by a specific snapshot only.

diff against the immediately preceding and immediately following snapshots, in succession, then, I guess. Possibly with some grep thrown in to straighten it all out.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
specifically, the following will print out the difference between the current state and the given snapshot.
Code:
zfs diff <dataset@snapshot>

You can provide a second snapshot to compare two snapshots
 

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
When you create a snapshot, zero data is written. Only a timestamp is noted down.
Everything you do on the volume/dataset (or previous snapshot) since that snapshot datetime is saved in that snapshot and the base volume/dataset (or previous snapshot) remains untouched.
When you destroy it, you 'lose' all changes made since snapshot time, being the diff.

If you rollback to a specific snapshot, all snapshots made after that one are then obviously destroyed.
Dunno if it's possible via the gui to rollback to anything besides the last snapshot though.
 
Status
Not open for further replies.
Top