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?

4
  • 2
    Restore from your most recent backup. That's what backups are for. You do have a backup, right?
    – DopeGhoti
    Commented Aug 8, 2017 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
    Commented Aug 8, 2017 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
    Commented Aug 8, 2017 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. Commented Aug 8, 2017 at 22:34

1 Answer 1

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.

1
  • 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
    Commented Aug 8, 2017 at 22:35

Not the answer you're looking for? Browse other questions tagged .