I have a dedicated server. I've been developing an app to handle my music collection, and I had in the past set up a backup solution for my code, but I blacklisted the /music folder . And the worst has happened, I've accidentally recursively deleted the folder using unlink and rmdir php's function. There was about 50GB of data, .mp3, .ogg and .m4a .
I know there is solutions around, like foremost, scalpel , photorec, extundelete to recover deleted data.
Mostly, my problem is that the partition where data stood /dev/sda2 is 897Gb, and the system partition is only 20Gb. I asked my system provider OVH if I can add some more space via another DD or USB drive, but it's impossible. I also asked if I can pay for a copy of the entire disk, but it's also not possible.
I'm thinking about three possible solutions:
Use one of the program and copy to the available space in /, and do it several times, each time I'll scp the current recovered data to another server I own.
Other solution would be to make an image of the partition and scp it progressively to the second server ( I really don't know if it's possible )
Third solution, would be to repartition the /home sda2 main partition, but I'm afraid this will corrupt / erase / overwrite the not yet recovered data.
What can I do to recover my data in this special case?