I threw together a build of Testdisk for Gen2 hardware over a year ago. You can find it, and some other recovery software you can run on the unit in this thread.
Power off the unit and keep it powered off until you are ready to do the recovery. The longer you let it run, the greater the liklihood that your deleted data will get overwritten by system processes writing to the disk.
Removing the disk from the shell and hooking it to a computer for recovery is the most likely to get good results, but if you cannot do that, you can run the software we built from sources (and put in that thread) on the unit itself over ssh and do it that way.
Data recovery is not a guarantee; Any data you do succeed in getting back is something to be thankful for, but this is very hit and miss. Some software does better than others, which is why many programs were mentioned in that thread, and then posted about. Use whichever one works best for you and your needs.