Does rsync detect file corruption?

Christian Hecht mortaxx at gmx.de
Sun May 24 13:05:57 GMT 2009


This will safe you if your file is corrupted on the backup side. Rsync  
will copy it then again from the source because the checksum is  
different and everything is okay.

But imagine the file is corrupted on the source side. Then rsync will  
copy the corrupted file again and if you delete older backups, at any  
time your backup is corrupted too.

Someone pointed me to this case a few weeks ago, so i started thinking  
how to avoid this.

I will try to write a tool which stores the rsync checksums ore  
generate own checksums for each source file.
Then, at any time the stored checksums can be compared with the source  
files.

Best regards
Christian

Am 22.05.2009 um 16:22 schrieb Daniel Carrera:

> Matthias Schniedermeyer wrote:
>> Exactly.
>> But you can (periodically) add "-c", then rsync while checksum the  
>> whole content of all files.
>
> Thanks. I'll add a -c for the Saturday backup.
>
>> But IF you have (or suspect) such type of corrution, you have have  
>> an even greater problem: Your hardware is crap.
>
> Yeah. I hope I don't have that particular problem. But I want to be  
> prepared if it happens.
>
> Daniel.
> -- 
> Please use reply-all for most replies to avoid omitting the mailing  
> list.
> To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html



More information about the rsync mailing list