2

I have a failing external hard drive (WD Passport). It has an ExFAT formatted partition from which I would like to recover as much data as possible. There are one or two thousand files with sizes around 20-40 MB (raw image files).

I made an Ubuntu 16.04 live USB. What tools does it have available that can help me recover data from the drive?


Ubuntu has already been helpful because a simple cp command does not hang on files which it cannot read. After a few seconds of trying it simply says "Input/output error" and moves on to the next file. In comparison, OS X would not mount the volume at all and Windows 10 would get stuck indefinitely on files that couldn't be read. With Ubuntu I got maybe 2/3 of the files using a single run of cp.

Is there anything I can do using Ubuntu beyond having run cp once on the directory I am interested in? Are there tools that can attempt a more aggressive recovery (and would skip the files which were already copied)? Note: I only have a live USB stick (2 GB). At this moment I don't have access to a computer with Linux installed permanently.

Note: I cannot cd into all directories on the broken volume, but the directories containing the files of interest seem to be fine. I am not looking for tools which are designed to look for files that seem to be lost from the file system.

Szabolcs
  • 556

2 Answers2

6

Use rsync. Something like this should work:

rsync -av --ignore-errors /defective/disk /safe/disk

It will copy all files that can be copied. Errors will be ignored, and the copy continues. If you omit that, the copy will stop upon an error.

Do note you might be interested in making a block by block copy of your disk. This will create a huge file. You can do this with dd.

dd if=/dev/defectiveDisk of=/target/disk/block-by-block.imh bs=1G conv=notrunc,noerror

This gives you an image of all recoverable blocks

This image, you can later mount as a loopback device. That way you can concentrate on saving your files without straining the defective disk.

jawtheshark
  • 2,617
1

Well I recommend a few softwares you can depend on while you have failing HDD to clone. They are dd_rescue, dd_rhelp and GNU ddrescue. Out of these good tools , I prefer GNU ddrescue to go a head with. You can google how to work on these softwares. The above said softwares are all the different variants of famous dd application. GNU ddrescue is the successor of dd_resuce. Meanwhile all these packages are known in different package name in ubuntu and the info can be viewed over here

SAGAR Nair
  • 1,415