Recover deleted files with Magic Rescue

Categories: Utilities

If you’re trying to recover deleted files or files in a corrupted partition, you might want to give Magic Rescue a try. With this command-line tool you will basically be looking for specific file types (searching by their extension). So, for a massive file recovery task, it will not be a good approach.

The program uses what it calls “recipes” as the instruction of which files to look for and how to do so. On a standard installation of Magic Rescue on my Ubuntu 9.04 distro, I got the following recipes (located at /usr/share/magicrescue/recipes) :

  • avi
  • elf
  • gimp-xcf
  • gzip
  • jpeg-jfif
  • mp3-id3v2
  • perl
  • zip
  • canon-cr2
  • flac
  • gpl
  • jpeg-exif
  • mp3-id3v1
  • msoffice
  • png

If you’d like you can write your own recipe, the man page will instruct you how to do so.

To start looking for files, make sure you create an output directory and than execute:

magicrescue -r [name of recipe] -d [output directory] [DEVICE PATH, eg /dev/sda]

*more options and parameters are available, the above are the mandatory ones.

I used it testing .avi extensions and it worked pretty well to recover some files I had deleted even a long time ago.