File Recovery setup

Status
Not open for further replies.

TheBestIGot

Dabbler
Joined
Jan 8, 2017
Messages
32
Hi,

I'm having the hardest time finding comprehensive instructions on setting up file recovery on my home FreeNAS.
I looked into ZFS and Snapshots, but I think I set it up wrong because I cannot recover files if I delete them.
Can someone point me in the right direction?
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Hi,

I'm having the hardest time finding comprehensive instructions on setting up file recovery on my home FreeNAS.
I looked into ZFS and Snapshots, but I think I set it up wrong because I cannot recover files if I delete them.
Can someone point me in the right direction?
Welcome to the forums!

First you have to configure snapshots on the volume(s) you want to share via Windows. Then you need to specify the appropriate 'Periodic Snapshot Task' for the SMB share on FreeNAS. It's an advanced option, as described in the documentation here:

http://doc.freenas.org/9.10/sharing.html#windows-smb-shares

Here's a screenshot from my system, showing the edit screen for one of my shares and the portion of the dialog where you set the snapshot task to use:

smb-share-advanced-settings.jpg
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
And another thing... even after you have this set up correctly, you won't see any previous versions of files except for those files that have changed since you began taking snapshots.
 

TheBestIGot

Dabbler
Joined
Jan 8, 2017
Messages
32
And another thing... even after you have this set up correctly, you won't see any previous versions of files except for those files that have changed since you began taking snapshots.

Thanks! Though I use a mix of Linux and Macs for my machines. Granted they can do SMB, but I try to stick to AFP. Does the same apply despite the share? (I'm thinking it does, but just verifying.)

Also, if the original file is there, it gets deleted, I should be able to restore it with this feature. Right?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
This functionality is getting an overhaul in FreeNAS 10 (and 9.10.3, I think) to allow for all snapshot tasks to be exported, which will be a major improvement.
 

TheBestIGot

Dabbler
Joined
Jan 8, 2017
Messages
32
This functionality is getting an overhaul in FreeNAS 10 (and 9.10.3, I think) to allow for all snapshot tasks to be exported, which will be a major improvement.

Do you think I should just wait for that version before I implement?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Joined
Dec 2, 2015
Messages
730
Thanks! Though I use a mix of Linux and Macs for my machines. Granted they can do SMB, but I try to stick to AFP. Does the same apply despite the share? (I'm thinking it does, but just verifying.)

Also, if the original file is there, it gets deleted, I should be able to restore it with this feature. Right?
There may be a better way to do this, but the brute force method would look something like this:
  • set up periodic snapshots on the dataset you want. You'll want to set a suitable retention period - long enough to make the feature useful, but short enough to avoid filling up the storage with snapshots.
  • when you later need to recover a deleted file, figure out what date and time the file would have been available, and find the snapshot in the GUI that corresponds to this date and time. You can use the Filter button to help narrow down the number of snapshots that are displayed.
  • select the snapshot of interest, and then click the "Clone Snapshot" icon on the right side of that line. This creates a new dataset that contains the contents of the snapshot.
  • Find the file and copy it to your normal dataset, then destroy the cloned dataset.
 
Status
Not open for further replies.
Top