How do I make rsync ignore unreadable files (damaged sectors)?

Wayne Davison wayned at
Tue Dec 22 09:02:53 MST 2009

On Tue, Dec 22, 2009 at 4:18 AM, Tomas Gustavsson <tomplast at> wrote:
> Still, I do think that rsync should give up after a long time, but it doesn't.

Yeah, if it gets a read error for a part of a file, it substitutes
zeros for the data and keeps trying to read the file.  That could make
it take an eternity for a large file that is entirely unreadable.  It
would also mark the file bad, and retry sending it, so expect double
the fun.

So, yes, this is something that could definitely be improved in a
future version.  Perhaps simply adding a read-error counter, and
stopping after a certain point (truncating the file's data) with an
option to override the short-circuiting would be good.


More information about the rsync mailing list