Help using rsync
hashproduct+rsync at gmail.com
Wed Dec 27 18:53:05 GMT 2006
On 12/26/06, Shiva Kumar R <skumar at ipunity.com> wrote:
> I want to do a fetch files from the remote server using rsync on a regular
> interval basis.
> Every client checks the file in the remote server and if it finds that there
> is a change in the file that exists in the server compared to the file the
> client is having the the client has to fetch the file from the server.
> Here I need to maintain the sync between the client and the server using the
> client timings.
I'm not sure what you mean by "using the client timings". By default,
rsync compares the size and last-modified time of the receiver's file
to those of the sender's file. If one or both of those attributes
don't match, rsync recopies the sender's file to the receiver's file
and applies the last-modified time from the sender so that the
attributes will match on the next run.
This behavior is suitable in most situations. If you want something
more complicated (for example, the client remembers the last time it
fetched files and asks the server for everything that has changed
since that time), you will have to script it yourself around rsync or
find someone else who has already done so.
> Since the server and the client are in two different
> timezones how to maintain the sync b/w these two??
If you use rsync's default behavior, you probably don't have to worry
about timezones, because last-modified times will still be equal when
they should be equal and unequal when they should be unequal. If you
use your own scripting, just be careful to store dates in UTC.
More information about the rsync