Has anyone used this repository? Please help me save my family photos

I have an external drive I accidentally formatted and I am trying to save the photos I had on it.
I have used Easy PhotoResQ in a windows machine to preview the lost data. It is all still there. I have also used
UFS explorer trail version and I can see the photos as a preview in their easy to use GUI as well.
Easy PhotoResQ is for windows only and not a ‘secure’ website. Plus as far as I can tell it is not supported anymore and probably wont refund my money if it doesn’t work the way it says it does
UFS explorer seems more trustworthy, but it is like $50 and I cant afford that anytime soon.
I posted about this on reddit and someone recommended this repo:

https://git.cgsecurity.org/cgit/testdisk/

Has one one used this tool?

How did it go for you?

Is there any chance of me destroying my drive’s lost data if I utilize this tool incorrectly?
I’m comfortable in a terminal environment, but only if I have a complete guide to use the tool. This is just a bunch of source code jarble to me, and there are no instructions.

Linux: I’ve used testdisk in the past and recovered data. Some info … https://www.data-medics.com/data-recovery-blog/how-to-recover-deleted-files-using-testdisk/

Windows: a program called recuva, plugged in my external drive, and was able to recover data.

HTH

1 Like

I wrote a guide a couple of years ago on using testdisk:

testdisk can scan for lost/deleted partitions, which would make life easier then needing to sort a massive list of random filenames. If the partition can’t be recovered, then the photo files can be salvaged using photorec (from the same developers).

The package (which includes photorec) can be installed from the Ubuntu repositories – no external repository or compiling needed:

sudo apt install testdisk

Is there any chance of me destroying my drive’s lost data if I utilize this tool incorrectly?

As long as nothing is writing to the “lost” disk, the data will still be there. Make sure you’ve got plenty of room on another drive to store the recovered (or fragments of) files.

3 Likes

Years ago I used UFS, it did work. But some file’s and directorie’s names were changed by the recovery process.

1 Like

What I am about to talk about is not really a solution to your specific problem. But, I will put it out there for consideration as a long term alternative since it guards against loss of data:

Install Syncthing and Syncthing-GTK (the GTK part is the GUI)

Syncthing is like Dropbox, except it does not a have central cloud. Instead, it uses a system that is more like torrenting. That is to say, after installing Syncthing, you allocate a specified folder for Syncthing to use. In this folder, you put any files you want to share. So, for example, you could keep all of your family’s photos and videos in there. And, of course, you can organise the data with as many sub folders as you wish.

Then, inside Syncthing-GTK, you generate a special code which you email to all of the people you wish to share the data with. If they install Syncthing, they can use this code to sync up to your specified folder. At that point, all of their folders will begin to upload a copy of everything that is in your folder.

In terms of syncing rules, these are very flexible. You can set up your folder as a master so only you can change its content. Thus, if people add stuff to their folders, a copy will be made in your folder. But, any deletions in their folders will not cause deletions in yours. Or, you can set up the system to be fully dynamic so that all edits in any individual’s folder will be fully synced as changes in everyone else’s folders. There are also other variants of the above data security measures, I think.

It’s been a while since I have been in there but, in short, the way I set mine up is slightly convoluted. In the shared folder, we have a sub folder for every user who is synced up. They are expected to take care of and are responsible for what goes in their own sub-folder and what does not. But, that is not where they actually do their insertion/deleting of data. Instead, they have an “offline folder” on their device, where they do that. Then, using Linux’s own internal folder syncing software, their offline folder’s contents are internally synced to their Syncthing shared sub-folder. This means, if any user in the group were to accidentally delete another user’s sub folder in their copy of the shared folder, in due course (depending on the refresh rate set with the internal Linux folder sync command) it will be reinstated via the internal Linux folder syncing that has been set up with the other user’s device’s “offline folder”.

The main advantage of this system over normal cloud storage is that you are not dependent on some distant, singular server always being operational. The data, in this case, is truly distributed and so is extremely robust in terms of data integrity. Thus, if your hard drive dies and you lose all of your data, all you need to do is to re-install Syncthing, reassign the share code and your folder will update with the copy everyone else in the group holds.

I use this system as a distributed photo and video album for all of my family.

2 Likes

OH wow thank you so much for the work put in making this tutorial. I am not sure how much data I actually have on the external drive. I want to say it about half a TB but it may not even be that much.

My main drive is only 1TB but I have another 1TB Laptop drive I can connect to offload it to as well
If I can save only half the photos it would be the best thing ever!

1 Like

This seems like an awesome utility. I am definitely going to look into to this. Thank you so much for the information.

I don’t know how I did this. I was learning about manually partitioning my Ubuntu installations early this year and I accidentally installed on my external drive (must have been tired and up too late)

So embarrassing :sweat_smile:

1 Like

OK Im totally stuck. I cant explain it but here are my screenshots which explain what I’m doing kinda.

screens of me failing at TestDisk

I am no expert with TestDisk, but is there any reason you picked the smaller partition vice the biggest partition (3). I would think your data is there.

If you see the 4th screen shot, I explained that any of the part I select, it still takes me to the same screen to write the entire image to home folder. I have selected all 3 there, as well as while selecting the Intel/PC option in the first screen after you select the disk to work in.

Oh silly me! :roll_eyes: I just figured out undeleting (which is the focus of the guide) will show the List option if the partition exists (like accidentally deleting a folder one day), but in this case, the partition isn’t known so it won’t be able to properly list the file structure. That could be why.

I didn’t realise we’re dealing with 4 TB, so it would take a very long time depending on how the drive is connected. I’d recommend plugging into USB 3 (blue) if you’ve got one, or plug it directly into the motherboard’s SATA port (if it’s a desktop). Bog standard USB 2 will take a very long time (1.4 days at best).

Looking at their wiki (it’s been a while), once the analysis is complete, you might see the option to list the partition or write the old partition table to disk. Presumably, the old partitions were NTFS, so far so good.

Ideally, if you can get the original partitions back then that would be grand. Otherwise, your other choices is to create an image of the “unknown partition” and attempt to restore its filesystem (bit advanced, doesn’t mess with original disk) or use photorec which will literally dump all fragments of images.

2 Likes

THANK YOU EVERYONE! I saved my data with PhotoRec but I had to use it in Windows. I got stuck in Ubuntu a few times as I showed here

I will never let this happen again. I must have been sleep-computing, high out of my mind, or something when I did that. ( I don’t drink or smoke btw)

THanks stevecook for recommending Syncthing and Syncthing-GTK

I’m backing up multiple copies of what I saved.

Now I have to organize it all :rofl:

Merry Christmas / Happy Holidays Everyone! This is the best one in a while for me just because of this. I couldnt have done it without all your wonderful input!! Ubuntu MATE community rules!!:confetti_ball::snowman_with_snow: :gift:

2 Likes