1

Tried foremost but as far as i can see it only recovers the files itself.

Is there some tool which reproduces the directory tree? I mean according to path of a file. does the ext4 filesystem even keep path when removing the file?

closed as too broad by Christopher, Rui F Ribeiro, GAD3R, Anthon, xhienne Aug 8 '17 at 22:47

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Restore from your most recent backup. That's what backups are for. You do have a backup, right? – DopeGhoti Aug 8 '17 at 15:40
  • sadly not :/ This is so awkward, I shouldn't have asked xD.. oh my god i feel so sad and stupid.. – Junaga Aug 8 '17 at 15:45
  • 1
    I'm sorry that you've lost your data structure; I hope nothing too critical was destroyed with the errant rm. – DopeGhoti Aug 8 '17 at 15:49
  • 2
    The question might appear awkward, but it is legitimate. One may need to restore the files between the last backup and the moment of the disaster. Say for instance that you saved a crucial file 5 minutes ago and the last backup was 4 hours ago. The backup would be no good. – Andrea Lazzarotto Aug 8 '17 at 22:34
1

There's extundelete, magicrescue and testdisk, and more. Of these, extundelete best suits your requirement. Explore the --restore-directory /some/path option. You can at least get your files named correctly, as they were named before your mistake. You can also limit the restoration within a date range.

  • thanks. thats a good list to begin with. I make an image dump and work my way throw the fs over time. Already have a new install running. there was nothing on data i need immediately, thank god. – Junaga Aug 8 '17 at 22:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.