How to avoid copying corrupted files with rsync
- by Roberto Aloi
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?