mirroring a huge file using rsync while it's being written to.

Yogesh Kumar dhyans at gmail.com
Tue Aug 5 12:12:30 GMT 2008


Hi All,

In the application that I am building, I've to "incrementally" copy several
files of large sizes (around 1 GB) from several machines (some 300 in
number) spread across various geographic locations. We've been using scp
until now and are exploring rsync for the same. In my application, these
files are being written to (still being updated) while rsync will be reading
from them. To clarify my point further, we invoke rsync to read a file from
a remote server where it is being continuously written to by another daemon.
So we want to rsync repeatedly every few minutes to get the latest appended
information to the remote file.

I should like to know:

(1) While reading from a file, can rsync be made to wait for some duration
after it has read the last byte in the file, to re-read the next
installments of additions done to it by the write daemon on the remote
server?

(2) When we know that the only additions/changes to the remote file will
happen at its tail, i.e, all the "writes" to the file are basically
appending to the file.

(3) While rsync is updating the local copy of the remote file (at the local
end), and is merely appending to it all the time, can I read from it "live",
ie, read it while it is being appended to. I am invoking rsync with the
--inplace option. Will the data be inconsistent while I am reading from it?


thanks
-y
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list