linux – photorec photo recovery software does not see my file system mounted – trying to use photorec to recover lost jpegs files

I'm working on a Dev Ops capability for a service that manages jpeg files online. We had an unfortunate deployment and our media files (jpegs) have gone completely. I anticipate that our loss is probably simple and may be recoverable. I think that somehow the directory that contains the subdirectories that have our jpeg files was not linked. If this is the case, we should be able to recover them.

I realized the loss almost immediately and, fortunately, we did not have users online at that time. I stopped our service and downloaded our server. I did that to prevent more scripts in the file system from considering that avoiding scripts was essential for file recovery.

We are running Ubuntu 16.04 on DigitalOcean. I have backed up the server using the DigitalOcean recovery mode. This allows one to mount the file system of the given virtual host without running the virtual host and without running the services that one has on the virtual host. This should be sufficient and correct to perform any form of recovery.

I need some where to write the data for recovery. For that purpose, I have another server in DigitalOcean in the same data center (SFO1 unfortunately). I have mounted the file system of that host using sshfs. I should be able to write any recovery data from the file system of my virtual host (which is in recovery mode) to this other host through sshfs.

I selected the following utility to execute my recovery: PhotoRec

That utility is actually two utilities: PhotoRec and TestDisk.

The file system of the host that we want to recover is ext4. PhotoRec supports ext4. TestDisk may not be compatible with ext4. Okay, according to the documentation if the data is still there and largely uncorrupted, then we can recover it with PhotoRec.

Here is the output of when I run df -th – As you can see the file system that I want to recover is / dev / vda1 it's kind ext4 and mounted through / mnt . I installed photorec in / lib / live / mount / overlay what is the tmpfs I have mounted another host through sshfs within the same data center to place the recovered data in:

root @ xxxx-xxxxxx-xxxxxxxxx: ~ # df -Th
File system type Size used Avail Use% Mounted on
udev devtmpfs 7.9G 0 7.9G 0% / dev
tmpfs tmpfs 1.6G 6.2M 1.6G 1% / run
/ dev / sr0 iso9660 251M 251M 0 100% / lib / live / mount / medium
/ dev / loop0 squashfs 220M 220M 0 100% /lib/live/mount/rootfs/rescue_rootfs.squashfs
tmpfs tmpfs 7.9G 14M 7.9G 1% / lib / live / mount / overlay
superposition overlay 7.9G 78M 7.8G 1% /
tmpfs tmpfs 7.9G 0 7.9G 0% / dev / shm
tmpfs tmpfs 5.0M 0 5.0M 0% / run / block
tmpfs tmpfs 7.9G 0 7.9G 0% / sys / fs / cgroup
tmpfs tmpfs 1.6G 0 1.6G 0% / run / user / 0
root@xxx.xxx.xxx.xxx: / fuse.sshfs 311G 13G 298G 5% / mnt2 / xxxxxx-xxxxxx-xxxxxx
/ dev / vda1 ext4 311G 41G 270G 14% / mnt

When I run photorec just see:

> Disk / dev / sr0 - 252 MB / 250 MiB (RO) - DVD-ROM QEMU

I do not see my file system where I want to run the recovery. That is to say:

/ dev / vda1 ext4 311G 41G 270G 14% / mnt

I have tried this with my file system mounted because it seems right to me. However, we find in some online documents that some file recovery tools require that file systems are not mounted (which seems strange to me: how it is supposed to work). So I tried to execute it disassembled but the same: just see:

> Disk / dev / sr0 - 252 MB / 250 MiB (RO) - DVD-ROM QEMU

Does anyone have any suggestions regarding getting photorec to see my file system:

/ dev / vda1 ext4 311G 41G 270G 14% / mnt

I have some backups, but unfortunately, I have about seven days of pictures without backup. In theory, we could live without them and reach our customers and get data from them and re-process them and re-publish them. But it would be ideal, if you could with just a few clicks of some buttons, recover this data that probably still can not access the file system.

Help using photorec for this purpose, it would be ideal, just like any other suggestion on how to recover my lost / lost files.

Thank you!