Restore files from .recycle

tstorzuk

Explorer
Joined
Jun 13, 2011
Messages
92
A little help please;

I'm running FreeNAS-11.1-U7 and I'm writing up a How To for people when I'm not available to do the maintenance/upkeep myself.

I'm at the point where I'm detailing recovery of files from the .recycle bin, but I'm a bit stumped. I don't know how to actually recover files from the .recycle bin. I've never had to do it myself and therefore have never investigated the process.

I've tried dragging and dropping (doesn't work as the recovered files are 0 bytes and useless). Tried to right click on the file, but no "recover" option available. I've searched the forums, but nothing came up that details the process. Only a lot of "I've deleted files, I never set up the recycle bin or snapshots - how do I recover files" type questions. I've searched the user manual (version 11.1-U7) and the only reference to "recycle" is how to set it up, deleted files go into it, reclaiming space by emptying it, controlled by SMB share options. Absolutely nothing on how to recover files from it (unless it's called something else in the user manual).

I know that the .recycle bin is just a location of where the file previously existed. So I'm not sure what to do at this point. A little help would be appreciated.

FYI, I do not have snapshots enabled. That's important for you to know when replying. And if I need to set up snapshots to recover files, a little help (point in the right direction) would be appreciated.

Thanks in advance for anyone that helps. I know this is a legacy OS, and I might not hear back anything. So your help is greatly appreciated.

MOBO - Supermicro MBD-X9SCM-F-B
CPU - Intel 4 Core Xeon E-1230v2 3.3GHz 5.0GT/s 8MB LGA 1155
MEMORY - Kingston KVR16E11K4/32 DDR3-1600 32GB(4x8GB)/1Gx72 ECC CL11 Server Memory Kit
CONTROLLER CARDS - (3x) IBM ServeRAID M1015 8 Channel PCI-e x8 SAS/SATA RAID Controller (46M0861 Aka 9220-8i) Flashed in IT Mode (straight passthru)
 

Braveheart777

Dabbler
Joined
Feb 5, 2021
Messages
13
Looks like you and I are in the same boat. My wife deleted all of her photos. She was using Mac connected remotely to and SMB share I had setup in a RAIDZ2 pool. I turned off the server asap. No snapshots. The "how to setup" guide I followed on YT never mentioned it.

I've been looking at Hetman Data recovery for Windows. Looks like a $500 fee. :frown: No idea if it can help me or not. I see that most of these posts are usually responded to "Sorry, no snapshots. Kiss your data bye."

Does anyone have a mercy card for us? Any tips that may give us a chance to recover?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Any tips that may give us a chance to recover?
Never checked it out, but I saw that testdisk/photorec seemed to have some level of zfs support added a few years back, but looking at it now, it mentions support only for Sun ZFS... maybe compatible, but can't be sure.
 

Braveheart777

Dabbler
Joined
Feb 5, 2021
Messages
13
Never checked it out, but I saw that testdisk/photorec seemed to have some level of zfs support added a few years back, but looking at it now, it mentions support only for Sun ZFS... maybe compatible, but can't be sure.

Thanks! Hadn't heard of that one.

Anyone else?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
@Braveheart777 - In theory, you can "roll back a pool" to a prior transaction. But, their are a limited number of roll backs possible. And it is pretty advanced work, not suitable for the feint of heart. Even I would hesitate to do this. (But, would try if that was my only option...)

The best way to handle this is to have a raw copy of your RAID-Z2 disks stored elsewhere. Thus, if you screw up your recovery attempt, you have an exact copy of your pool that you can copy over. Then try, try again...

As for the details, it's complicated and I can't walk someone through it remotely, when I barely understand it myself. But, to summarize, OpenZFS is a copy on write file system. Any new write uses previously free space. Thus, the immediate prior transaction will point to old, but intact data. The older you go, the less chance that the data is completely intact. See the manual page for zpool-import for details. As I said, I can't walk someone through this remotely.


One side note: OpenZFS' move to 4KB disk sizes seems to have reduced the transactions saved to 1/8, (if I understand that correctly).
 
Last edited:

Braveheart777

Dabbler
Joined
Feb 5, 2021
Messages
13
@Braveheart777 - In theory, you can "roll back a pool" to a prior transaction. But, their are a limited number of roll backs possible. And it is pretty advanced work, not suitable for the feint of heart. Even I would hesitate to do this. (But, would try if that was my only option...)

The best way to handle this is to have a raw copy of your RAID-Z2 disks stored elsewhere. Thus, if you screw up your recovery attempt, you have an exact copy of your pool that you can copy over. Then try, try again...

As for the details, it's complicated and I can't walk someone through it remotely, when I barely understand it myself. But, to summarize, OpenZFS is a copy on write file system. Any new write uses previously free space. Thus, the immediate prior transaction will point to old, but intact data. The older you go, the less chance that the data is completely intact. See the manual page for zpool-import for details. As I said, I can't walk someone through this remotely.


One side note: OpenZFS' move to 4KB disk sizes seems to have reduced the transactions saved to 1/8, (if I understand that correctly).

Thanks Arwen! I have all my other data. Not worried about losing it. Sounds complicated. I'll do some research.
 
Top