Just Fantastic Chris! The script worked flawlessly on the recovery of my op directory deleted by mistake by my wife; it contained files dating back to 1996
The complication (took me 5 weeks) was to install and learn UBUNTU (brilliant) and then all the work arounds needed to accomplish to task. I have tried almost all recovery software available online, but all failed.
What I needed to recover was: 1- complete directory structure and 2- correct files names. To do this on my 8TB WD my cloud home required:
1- remove from the casing,
2- remove the disk from the slot where RJ45, USB and power input;
3- get a properly powered disk bay with two slots (1 to read from source drive and 2 a target drive to save recovered files and directories).
4- On source disk, only partition dev24 (the largest) is of interest as it contains both the “index.db” and “files”.
5- Particular attention should be given to the script; not evident for a beginner to write the path for the target. However, once both disks are in the bay with power and usb plugged, then “Disks” in Ubuntu sees them. From there it is possible to identify the correct path.
6- Downloading and installing Spyder on Ubuntu also helped.
7- I have a little more than 1TB of files and I use seven human languages (English, French, German, Arabic, Hungarian, Czech and Slovak) and now I am recovering them while maintaining the special characters in each of these languages.
8- WD does not encrypt files, but files them with file identifiers and maintains them through the index.db.
NOTE: Very disappointing that WD did in fact create a “trash” bin and placed the parent delete directory and all files under it under the trash bin, but WD does not allow end users to see this “trash” bin and hides it from users of a single drive (my cloud home). So what, I have to send the drive from the Middle East to recovery companies accredited by WD while the dive is still under warranty? Naturally such companies (listed on WD site) will not acknowledge the warranty because they didn’t sell the system. I believe these companies are subsidiaries of or related entities to WD and they are just vehicles created as a way to make extra money and walk away from warranty issue. If not so, why then create a t"rash" bin but not provide a function for the end-user of single drive of my cloud home to access this directory???
I cant say that I have become an expert, but for anyone let me know if some difficulty is encountered, and most importantly, when a disaster happen, unplug power to the disk (my cloud home), prepare your work and test script on other disks if you can before going live recovery.
Many thanks again Chris.