cronning rsync

Harala, Sauli sauli.harala at eds.com
Thu Jun 20 05:50:02 EST 2002


Hi,

We have written a few lines in an envelope shell script 
to prevent this kind of trouble. This idea is very common in Unix - 

0) Check from 'ps' - is there any active pid where 
there is a corresponding log/rsync.<pid> file - if there is terminate 
with log message. 
1) write PID to a certain ..log/rsync.<pid>
2) do the rsync stuff
3) remove my ...log/rsync.<pid>
4) Terminate

(It is sometimes wise to clean up possibly 
crashed ..log/rsync.<pid> files - or make an enhancement which 
deletes them if there is no active corresponding PID
in the system in the step 0)

sh



-----Original Message-----
From: matthew.2.burgess at bt.com [mailto:matthew.2.burgess at bt.com]
Sent: 20. kesäkuuta 2002 14:51
To: rsync at lists.samba.org
Subject: cronning rsync


We're thinking about putting rsync to use in our production environment.
What we want to do is have a cron job running on a client that replicates
files on the host every five minutes.  We believe that some of the files
will take longer than five minutes to complete.  From the limited testing
I've done it looks like the first rsync session correctly identifies the
file as a candidate for transferring.  Five minutes later the second rsync
process is started and it too thinks that the file is out of date (as it
still is) and subsequently starts transferring the file again.  Ideally, the
second process should realise that the file, although being out of date, is
already in the process of being synchronised, and therefore ignore it.  Does
an option exist that handles situations like this (and I've simply
overlooked it) or is my situation general enough to warrant a feature like
the one above being implemented?

Thanks in advance,

Matthew Burgess

British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ
Registered in England no. 1800000
This electronic message contains information from British Telecommunications
plc which may be privileged or confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately.


-- 
To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html




More information about the rsync mailing list