rsync -auIn not doing what I expect (rsync 2.6.3)

Wayne Davison wayned at
Fri Feb 4 23:41:02 GMT 2005

On Fri, Feb 04, 2005 at 11:41:28AM -0800, Bart Brashers wrote:
> The "-I" tells rsync to ignore the timestamps (the corrupt files still
> have old timestamps) and the file sizes (the corrupt files are the same
> size as the backup non-corrupt files) and do the checksums to determine
> which files need to be transferred.

This really tells rsync to skip the quick-check of the time/size and
transfer everything (barring other restrictions).  Identical files will
be quickly updated because of all the matching data in the basis file
(if -n weren't specified).  If you don't want to see the identical files
listed, you'll need to use the -c option, which turns on a checksum
pre-check (making -I redundant).

> However, it appears from the lines of output that rsync spews out, that
> it would clobber newer files.  Does turning on "-I" mess up the
> time-comparison needed by "-u"?

I tested 2.6.3, and -u prevents rsync from updating an older file, even
with -I (with or without -c).  Oh, I see, your command is wrong:

> rsync -auIn backup:/archive/home /home

You should either leave off the trailing "home" in the destination, or
use a trailing slash on the source:

    rsync -auIn backup:/archive/home /

Without that, rsync is copying all files into /home/home.


More information about the rsync mailing list