Then find the file, or files, that you want, and copy the to a new location.
Although I still think ZFS should implement a feature where you can "link back" to blocks in a snapshot. This would make it possible to restore individual files from snapshots without consuming the extra space of essentially having two "copies" represented by different records. This becomes even more useful for restoring very large files.
I brought it up as a "what if" thought experiment here:
We all know we can revert a dataset to a previous snapshot. It's like hitting the "undo" or "rewind" button. Simple enough. Now you have your dataset as it was, record-by-record, in a previous state. Everything you deleted is restored 100%, as long as it lived on the snapshot. No additional...
www.truenas.com
EDIT: Keep in mind I posed this question before block-cloning was a feature in ZFS.
Surely this is possible? OpenZFS 2.2 has given us "block cloning",
which is based on a similar concept. Why not also give us a way to "block-clone" using blocks that exist in a
snapshot?
Let's say you have a large 4GB file that you deleted (or modified), but the older version of it still exists in an earlier snapshot. You can't
rollback to this snapshot, because you'll lose everything that you created since that day. So you'll "browse" the snapshot, and then
copy this 4GB file to your live filesystem.
Now you've got an extra 4GB being consumed. (4GB for the file's blocks in the snapshot + 4GB for the file's blocks in the live filesystem.)
Ideally, we should be able to find the file in the snapshot and "block-clone copy" it as a new file in the live filesystem, which will not consume any extra space.
