Hey guys,
So like a few others, i've been hit with a predicament caused by user-error. In a single move, I lost the contents of one of my shares (possibly during a mv command or a sym/hard link moment). While the files lost weren't "important" enough for me to keep a backup of, they were plentiful, and reacquiring would be a far more painful task than the idea of recovery.
I saw from a few posts such as:
https://forums.unraid.net/topic/92076-whats-the-current-way-to-recover-deleted-files/
https://forums.unraid.net/topic/80815-urgent-problem-how-to-undelete-a-folder/
https://forums.unraid.net/topic/73937-help-recover-deleted-files/
that a few others have fallen through the same user-error as me and didn't have a backup. The common replies were "maybe xfs_undelete" but more possibly "maybe UFS Explorer". For anyone that doesn't know, UFS Explorer is probably the worst company/product experience I have. The "standard" license for recovery is for a product called "UFS Explorer Standard Recovery" but i'd forgive you for accidentally getting their "UFS Professional Recovery" or getting confused with "Recovery Explorer Professional", or "Recovery Explorer Standard". These are all the same company, and for the most part appear to be the same software (just with limitations/abilities added or removed). If you make the mistake and get UFS Professional Recovery's trial, like i did, and start the painstaking 8-11hour scan for lost data.....don't worry, you can NOT use that saved scan on the Standard versions. So, if you mess up like me, you may buy the license for the Standard (~75$) but accidentally download the Recovery Explorer Pro or the UFS Pro Recovery, start a scan, and then realize you don't have the right license nor can you bring the results/scan over to the Standard.
In the end though, Standard didn't work at all. It took about 3hours before it errors out and I haven't heard back from support. So I went with "xfs_undelete" instead.
So, as mentioned in the other threads, you'll need Nerd Pack to download tcl and tcllib. Then what I did was I stopped my array and mounted some large external storage (truth be told, i mounted an old NAS i had with 4bays, that i had replaced with unraid). Then, after mounting my Destination drive, I basically downloaded xfs_undelete, and used the following parameters to fit my needs. I knew what I was looking for (for me, video files) and I knew a date range of when they were deleted (Jan 9th):
xfs_undelete -t 2021-01-09 -r 'video/*' -o /mnt/remotes/nas-drive/xfs_undeleted/ /dev/sdd1
Now, the crappy part is doing it via cifs to the NAS, I can only run this for 1 drive at a time (the CIFS connection becomes unstable), but i reckon i could do this with drives connected via USB or SATA.
The results though are awesome! Instead of doing a scan first of everything and waiting for the Virtual Filesystem to be created, and then doing a restore job [UFS Explorers method] this just scans inode by inode and recovers immediately. The filetype allows me to just say every file of this type, rather than waiting for the vFilesystem, so that's great, but it does mean i'm going to get a bunch of junk i don't want since i can't specify filesizes (oh well). Best off...its free, and appears to just work.
Hope that helps others looking for similar support!