Does this work? I feel like I’ve done this successfully before but now I just empty clones and non-mounted datasets. And a lot of trying to find stuff in Linux shells and around and around I go.
Seems like a rather basic function to be able to perform…
You go to your Snapshot in the GUI, and then Clone to a New Dataset, and you can access via CLI / SSH or etc
Whether over SMB or SSH, you can navigate into a hidden .zfs/snapshot
directory. You will see all your snapshots represented as folders in here. Each folder begins the “root” for the filesystem as it existed at the time.
You must manually type .zfs/snapshot
to navigate inside, since it is hidden and will not appear otherwise.
If you are using SMB from a Windows client it is even easier. Using Explorer (the Windows file manager) navigate to the file you want the old version of, then right click Properties, look at the Previous Versions tab. All of the snapshots of that file should be listed there.
Thank you good people.
All right I’ll keep trying but I’ve made the clone, and restarted the SMB service and the share is empty. And I’ve navigated via Linux shell and the system shell and nothing. And I read posts like this that say there’s bugs and they exist right up until electric eel (my version).
[Snapshots Appear Empty When Browsing on Linux - TrueNAS General - TrueNAS Community Forums ] from TobeyChris in June 2024
And I started with File Explorer props and prev vers. There’s not much in there for the one file I seek to restore…sadly, That would’ve been nice a few hours ago.
tried cd /mnt/pool/auto-2025-june-5-whatever-clone and there’s directory as expected but they too are empty.
So I was trying that in FE on the file and obviously not getting what I sought, an hourly version for each snapshot for the past 2 mos. But I tried that on the parent folder, and root folder/share in File Exploder and saw a previous version for every hour on the hour since I migrated to this new Scale server from Core a month or 2 ago. Opening that from the folder level then gave me newer files to “see”. I gotta document this so the helpdesk and users can find their stuff long after this engineer has moved on! Lol Thanks
How did you set up your datasets in relation to your SMB shares?
That only works for old versions like you mentioned. If they’re trying to recover a deleted file it wont show up there, handy as it is.
(For other’s future reference)
No this works for everything. If for example you delete the test.txt file within the ‘Stuff’ directory then right click the ‘Stuff’ directory and select previous versions and you will see all the older versions (based on your snapshot schedule) of that directory and its contents.
Ah, just look at the previous version of the containing directory. I had only skimmed what TDAIDept last wrote, but I see now that’s what they meant. I’ve only actually had to restore from snaps in Windows thus-far so I never even stopped to consider that.
Seems obvious now, thanks!