Recovering files using TestDisk

I recently had a hard disk go bad. It had a single NTFS partition where the partition was no longer recognized by Windows or Linux.

I managed to recover (I think) all of my files by reading the data off of the disk using TestDisk. It discovered my partition without issue, and the actual file recovery went relatively smoothly.

I believe the way TestDisk was primarily designed to work was by attempting to actually repair the partition. This should be fine if you’re working on a copy of the raw disk bits (you can probably use dd for Windows for this, or write a program that accesses ), but I’d generally be averse to making any further changes to a bad disk. I chose to recover my data just by copying the files directly out. You can do this as follows:

  • go to (your disk) > Intel > Analyse > (your dynamic partition)
  • highlight your partition
  • press P to list files
  • press H to hide deleted files
  • press C to copy the current directory (the directory from which you started TestDisk)

One thing to watch out for when using this approach is to first make sure you press H to hide deleted files. Otherwise, you end up recovering deleted files as well, and sometimes these deleted files (for whatever reason—probably because my data’s sufficiently corrupted) end up pointing back into the root of the file system, leading to cycles in the tree and thus an infinitely recursive file copying procedure.

Follow me on Twitter for stuff far more interesting than what I blog.

  • Daniel

    where does tesdisk saves the recovered directory?
    what do you mean with directly out?
    Please let me know because i have the same problem and i don't know where this testdisk saves the recovered files

  • yaaang

    TestDisk copies your files to the directory from which you started the program. I updated the text to clarify this.

  • choad

    get a better theme

  • http://www.laptopbatteriesinc.com.au laptop battery

    Please let me know because i have the same problem and i don't know where this testdisk saves the recovered files

  • http://ideapumpkin.blogspot.com/ James1052

    TestDisk just saved my life per http://ideapumpkin.blogspot.com/2010/09/i-love-you-testdisk.html …My RAID card had hosed the partitions and TestDisk worked miracles…Wahoo!

    My new fave partition restoration tool! Good info about pressing H…

  • http://www.naturaltherapyforall.com/find-a-hypnotherapist Hypnotherapy

    Thanks for recommending this great product, I am going to try testdisk for sure.

  • http://www.pvc-bag.net waterproof bag

    From your information, TD seems a good tool. Thanks.

  • http://pulse.yahoo.com/_GKO42E5D4ZD6IOP5YL6KTF4COI Jenifer Sahn

    wow its really good to know that testdisk works so good to recognize the partition.
    http://www.intelinetsystems.com/image_backup.aspx

  • http://cpurepairtucson.com pc repair tucson

    I never even knew TestDisk existed. Will start using it on my field.

  • http://www.vacationhomes.net/vacation-rentals/south-carolina/a16863.htm Carolina Pattinson

    That’s a neat way to avoid the shock of losing all your data prior an exam :).