3

I'm in the process of salvaging what I can from an external hard drive. My Macbook can no longer read the disk at all, so I have the corrupted drive plugged into an old Linux notebook, and I'm copying everything over using rsync via ssh. It all went well and most of the files were copied over. But, when it finished, I saw a handful of errors, looking like this:

rsync: read errors mapping "/media/skifreak/kcMASTER/Photos/kc photos/INDIA MASTER/INDIA MASTER/Seltzer Delhi:Agra/IMG_2626.DNG": Input/output error (5)
ERROR: Photos/kc photos/INDIA MASTER/INDIA MASTER/Seltzer Delhi:Agra/IMG_2424.JPG failed verification -- update retained.

So, some of these files are broken, and that's fine. I have an older backup that I can use to recover these.

But, I didn't have the foresight to be putting all of these errors into a log. Is there a way I can scan through the drive to output a list of all corrupted files?

1

You could always run the same rsync again, this time redirecting stderr into a log. This would have the possible added benefit of recovering some of the corrupt files successfully (often on a degrading HDD read errors will be intermittent, and repeated attempts to read a single area may recover data even after the first one fails).

Alternatively, you could issue something like find /mnt/corrupted >~/corrupted_list and then check for files that are missing in the rsync'd mirror.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.