FYI, rsync has a good cleanup mechanism that kicks in when you send it
a SIGHUP. It removes/renames temporary files as appropriate, sends a
signal to its child process, and exits. I use this all the time to
gracefully stop transfers (see the pseudo-code in my previous message).
-- Alberto
In message <[EMAIL PROTECTED]>, Sean
Berry writes:
>
> It can do that in one of two ways: finish the current file, or back out
> the current file. Finishing the current file may leave it running til the
> next time rsync runs (assuming it'll run out of cron). Backing out the
> current file is probably what you want. Would it make more sense (and I
> don't know whether rsync currently supports this in the way I think of)
> for rsync to back out the current file and exit gracefully if it received
> a signal 15? This might be a functionality useful outside of the
> environment you have in mind.
>
> On Tue, 3 Apr 2001, Allen, John L. wrote:
>
> > Date: Tue, 3 Apr 2001 08:39:17 -0400
> > From: "Allen, John L." <[EMAIL PROTECTED]>
> > To: 'Dirk Markwardt' <[EMAIL PROTECTED]>
> > Cc: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> > Subject: RE: Need for an --operating-window feature ???
> >
> > A cron job is fine for starting it, but I want it to stop
> > on its own if it finds itself running outside its allowed window.
> > (Obviously this is only really needed when there is a huge
> > amount of data to sync, or when the network is really slow.)
> >
> > John.
> >
> > -----Original Message-----
> > From: Dirk Markwardt [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 03, 2001 03:38
> > To: Allen, John L.
> > Cc: '[EMAIL PROTECTED]'
> > Subject: Re: Need for an --operating-window feature ???
> >
> >
> > Hello John,
> >
> > AJL> to have a --operating-window option where you could specify an
> > AJL> allowed time of operation by indicating two endpoints, perhaps like
> > this
> >
> > AJL> --operating-window 22:00-05:00
> >
> > AJL> where the times are given in HH:MM 24-hour military time.
> >
> > What about a cron-job ?
> >
> > at 22:00: chmod 755 /usr/bin/rsync
> > at 05:00: chmod 644 /usr/bin/rsync
> >
> > Greetings
> > Dirk
> > --
> > ---------------------------------------------------------------------------
> > Dirk Markwardt
> > Besselstr. 7
> > 38114 Braunschweig
> > [EMAIL PROTECTED]
> >
> >
> >
>
> --
> Sean Berry works with many flavors of UNIX, but especially Solaris/SPARC and
> NetBSD. His hobbies include graphics and raytracing. He drinks coke mostly.
> His opinions are not necessarily those of his employers.
>
>
****************************************************************************
Alberto Accomazzi mailto:[EMAIL PROTECTED]
NASA Astrophysics Data System http://adsabs.harvard.edu
Harvard-Smithsonian Center for Astrophysics http://cfawww.harvard.edu
60 Garden Street, MS 83, Cambridge, MA 02138 USA
****************************************************************************