rsync not updating files even with checksum flag
Mark.Osborne at ni.com
Mon Nov 6 20:36:58 GMT 2006
I am having a problem with rsync that I hope someone can help me figure
out. We are using rsync to sync up files between our staging and
production ftp servers. Basically internal users are allowed to upload
files via a samba share to a staging server. Those files are then synced
out every 15 minutes via cron to our production ftp servers.
The problem occurs when a large file is being upload from a windows
machine via the samba share. If a rsync is instantiated during the time
that the file is being uploaded the destination machines get the file with
the correct filesize and timestamp. Unfortunately, even though the file
shows the correct size it is not a good copy of the file. An md5sum of
the files on both the source and destination machine returns different
results. I believe this occurs because windows automatically "reserves"
the full size of the file and fills it out with 0s and then overwrites
this as it goes along copying. This wouldn't be a big deal except,
subsequent runs of rsync (even with -c) fail to overwrite the file.
I have tested running an rsync while I was copying the file over to the
source directory locally (not via samba) and the file was corrupted.
However after running an rsync again, the file was updated. Basically the
problem only occurs when uploading the file via the samba share.
I know I could use the -I flag to ignore times and filesizes, but from my
understanding this would result in resyncing every file every time, and
this is not what we want. We are currently using rsync 2.5.5 on the
source machine, and 2.5.7 on the 2 destination machines, but I have also
tested using 2.6.8 on both source and destination with the same results.
Has anyone else experienced this problem before, or have any ideas for a
fix? Let me know if I'm not being clear enough, or any other information
I can provide.
Web Systems Engineer
mark.osborne at ni.com
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the rsync