[magicrescue](http://packages.debian.org/stable/utils/magicrescue)
is a tool for scanning damaged partitions and rescuing files which are recognised by their format’s magic bytes.
[photorec](http://www.cgsecurity.org/wiki/PhotoRec)
is similar tool focused on graphics formats but can recover files in other formats as well. Usually comes with the testdisk
program.