Howto to control rsync through cron

bart.coninckx at sita.be bart.coninckx at sita.be
Thu Oct 24 19:49:01 EST 2002


How about scheduling a script with some logic built in it that firsts
checks if a previous Rsync still is running. If so, it backs off, if not it
starts the sync.



Rgds,




Bart Coninckx
Network Administrator
CNE, ASE
*************************************
Watco ICT Services
Lilsedijk 19
B-2340 Beerse
Belgium

e-mail: bart.coninckx at sita.be
Tel: + 32 (0) 14 60 99 42
Fax: + 32 (0) 14 62 41 47
*************************************

========================== Disclaimer ==================================
The information in this email is confidential, and is intended solely for
the addressee(s). If you are not the intended recipient of this email
please let us know by reply and then delete it from your system;
you should not copy this message or disclose its contents to anyone,
not even by forwarding it.
Due to the integrity risk of sending emails over the Internet,
Sita ICT will accept no liability for any comments and/or attachments
contained within this email.
========================== Disclaimer ==================================





                                                                                                                                    
                    CAD/SysAdmin                                                                                                    
                    Manager                  To:     rsync at lists.samba.org                                                          
                    <Cad_Manager at vipg        cc:                                                                                    
                    .com>                    Subject:     Howto to control rsync through cron                                       
                    Sent by:                                                                                                        
                    rsync-admin at lists                                                                                               
                    .samba.org                                                                                                      
                                                                                                                                    
                                                                                                                                    
                    10/24/2002 21:23                                                                                                
                    Please respond to                                                                                               
                    Cad_Manager                                                                                                     
                                                                                                                                    
                                                                                                                                    



Hi,


  I have setup a cron job to rsync files between two servers every hour.


30 * * * * rsync -avz --delete rsyncsrv1::ftp/  /export/ftp/


  This works fine most of the time, but if I have a very large file that
needs to be transfered ( many tens of MBs), I run into a problem. Since the
link between my two servers is slow, it can take more than an hour to
complete the rsync transfer. So at the end of the hour, when the next rsync
job is started by cron, the big file transfer gets aborted and a new
transfer is started. Due to this the big file transfer never gets
completed.


  I have tried to increase the time between successive cron jobs, but that
is only a temporary fix untill I run into an even bigger file which causes
the new settings to fail. Is there a way I can control this behaviour, and
avoid this looping ?


  Thanks & regards,
--
Derric Lewis
CAD/System Administrator
Virtual IP Group, Inc.













More information about the rsync mailing list