How to avoid copying corrupted files with rsync

Posted by Roberto Aloi on Super User See other posts from Super User or by Roberto Aloi
Published on 2010-09-18T14:20:57Z Indexed on 2012/09/11 3:41 UTC
Read the original article Hit count: 207

Filed under:
|
|

I have an HDD with plenty of files, some of which are unfortunately corrupted. I'm now trying to copy the good files into a new HDD. I'm using:

rsync -azP SRC TGT

When rsync comes to one of the corrupted files, I can see a message in the console:

rsync: read errors mapping XXX: Input/output error (5)

In the target folder, I still see the corrupted file, which I'm not able to open and which I have to delete manually.

Is there any option to tell rsync not to copy files after a i/o error?

© Super User or respective owner

Related posts about osx

Related posts about backup