Hello Daniel

The default check is the time of last modification and size so if your corruption also leaves the file size the same the file will not be included for update.

You can use the --checksum option that also checks the file contents but this will significantly increase your disk I/O.

Giorgos


Daniel Carrera wrote:
Hello,

Suppose that every day cron runs this:

rsync -a --times --delete $HOME /my/backups/dir/latest


In general, rsync will only update a file if it has been modified. Now, imagine that one of the files becomes corrupted in the backup directory, but the timestamp hasn't changed. Will rsync detect this?

I am using rsync in a backup solution which could be summarized to:

cd /my/external/disk/backups
rsync -a --times --delete $HOME latest
cp -al latest $TODAYS_DATE


So, if a file never changes, I just end up with a lot of hard links pointing to the same block of data. That's meant to make the backup space efficient. But if that block of data gets corrupted, all my "backups" for that file are gone. And I'm concerned that if that happens, rsync will just merrily go along ignoring this file because the timestamp says that the file hasn't been modified so it doesn't need to be updated.

Thanks for the help.

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

Reply via email to