Disclaimer: I'm not very good at writing questions, and mine is a very specific scenario. So I'm just going to jump straight into the situation:
I was browsing my filesystem, and somehow managed to download the a tarfile containing two critical nodes (tarfile::todo/main and tarfile::todo/code) from my local FS, and write it to the same file. Once I realized what the downloader was doing, I quickly stopped it and checked the tarfile to find, to my dismay, that only a small chunk was left, and the rest was truncated off. I don't know why it didn't back up the existing file before writing something else to it, or why session.tar wasn't commmittedcommitted to my git repo, but now the whole thing's gone. I'm a very careful user, but when I fuckmess up, it's absolutely catastrophic.
After extundelete failed to recover the file, I browsed around here to find this, which gives a method combining grep and dd to find and read the data directly from the hard drive.
More context:
- My
/home/userdirectory is mounted on a separate drive:/dev/sdb3 - Today is day two trying to recover the files.
- The output in the next paragraph was generated today.
Once I did the grep/dd combo, I got this output. How in the world do I use this to get my files back? I tried copying it into a .file.swp and recovering with vim -r in the hopes that it was a vim swapfile, but it isn't. I have never seen this format before, so I have no idea what any of it means.
I would really like to get this data back. As I said before, it's critical. It's the veritable basket that has all of my eggs. Losing it would be a painful blow to productivity and organization.