rsync file corruption
andy.wong at casalemedia.com
Thu Sep 15 20:56:27 GMT 2005
I encountered a weird file corruption problem with rsync.
I have a perl script that generates and writes a data file to disk, then
rsyncs the file to a remote machine. A perl script running on the remote
machine periodically reads in the data file.
However, occasionally the remote script will barf while processing the
data file, and I tracked down the problem to file corruption.
I suspected rsync was the problem, so I changed the generation script to
rsync to a different file name, then remotely rename/ overwrite the file
with the new data file (using mv over ssh). And the file corruption
problem is gone.
Now from what I understand, rsync supposedly do the same thing: rsyncs
to a temporary file, then renames it. So what went wrong?
More information about the rsync