winnielinnie
MVP
- Joined
- Oct 22, 2019
- Messages
- 3,641
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 space is used up, since these "restored" files that were deleted are not "copied"; but rather, the pointers to their existing records are now in play, once again.
Okay, makes sense...
So here's my question: Is it possible to "restore" specific files from a snapshot, without having to revert back the entire snapshot?
I know that you can "copy" files from the
----------
Here's an example:
Let's say I have a dataset with a very large 5 GB Linux .iso. (The only reason we use bittorrent.)
I create a snapshot named "manual-001".
I do a bunch of stuff afterwards. Deleting, downloading, modifying, etc.
If I later accidentally delete the very-large-linux.iso file (5 GB), I can still find it under
I can even copy it back to my live dataset.
But now this very same file is consuming twice as much space: 5 GB for the (deleted) records that exist in the snapshot, and another 5 GB for the new records created from the copy to the live dataset.
Does ZFS contain a mechanism which restores a particular file by simply using the same records that already exist, without having to revert back the entire snapshot?
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 space is used up, since these "restored" files that were deleted are not "copied"; but rather, the pointers to their existing records are now in play, once again.
Okay, makes sense...
So here's my question: Is it possible to "restore" specific files from a snapshot, without having to revert back the entire snapshot?
I know that you can "copy" files from the
.zfs/snapshot/
directory, but this essentially creates new records. It's not using the existing records.----------
Here's an example:
Let's say I have a dataset with a very large 5 GB Linux .iso. (The only reason we use bittorrent.)
I create a snapshot named "manual-001".
I do a bunch of stuff afterwards. Deleting, downloading, modifying, etc.
If I later accidentally delete the very-large-linux.iso file (5 GB), I can still find it under
.zfs/snapshot/manual-001/
I can even copy it back to my live dataset.
But now this very same file is consuming twice as much space: 5 GB for the (deleted) records that exist in the snapshot, and another 5 GB for the new records created from the copy to the live dataset.
Does ZFS contain a mechanism which restores a particular file by simply using the same records that already exist, without having to revert back the entire snapshot?
Last edited: