tags:

views:

29

answers:

1

I am trying to use rsync to take backup of a rapidly changing directory having over 100 files. every time it is trying to copy all the files.-i option gives all +'s on a file which is not modified at all. ls -l | grep shows same result on server and client. But rsync -inv... shows >f+++++++++ .

Thanks, kaka

A: 

Rsync normally skips files where both versions have the same size and timestamp. Remember that "ls -l" doesn't show the exact modified time of the file down to the second. Make sure the files actually have identical timestamps.

If you find the timestamps aren't the same, the first thing to check is whether the system clocks on the two hosts are in sync. If the files are stored on an NFS-mounted partition, then you should also check the system clock on the NFS server. Files stored on a Samba share may have the same issue.

If you want to alter rsync's timestamp checking, you can try using the rsync option "--modify-window" option to control how picky it is about timestamps, or "--size-only" to skip timestamp comparisons altogether.

Kenster
Thanks Kenster.Now it works fine with -avrPiW --delete options, perhaps i did not check properly that day.
kaka