I accidentally deleted ALL files for my web server yesterday, and for some silly reason I have not made a backup in the last three months... Shame on me, I know.
The files were deleted with a bad rm
command, and the system was immediately shut down after I noticed. The files are mostly HTML, CSS and JavaScript, with occasional images and other files.
I downloaded SystemRecoveryCD, put it on a USB stick, booted it and ran PhotoRec on the disk. It found a few hundred thousand deleted files. They are all now safe on another disk on another computer. The correct files seem to have been found too.
Unfortunately, they are all put in some numbered folders, and all have a strange name beginning with "f" followed by what I suppose is the inode number of the file. An example is recup_dir.15/f990850128.h
. All timestamps and other metadata are also gone, along with the directory structure.
I grepped for the contents of one of the most important files, and it came up with no less than 397 versions of it. I assume each corresponds to a save of the file.
How can I find the newest version of the files? Are the ones with higher number in the filename probably newer? It looks like that from some quick visual inspection. Should I possibly try to recover them with something other than PhotoRec? The computer has not been booted into anything but SystemRecoveryCD since the accident happened, so the disk should be unchanged. It is an ext4
filesystem. It is not corrupt nor encrypted.