[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Way OT: scripting help

On Wednesday 23 May 2007 12:15 pm, Dimitri Yioulos wrote:
> On Wednesday 23 May 2007 11:16 am, Dan Young wrote:
> > Les Mikesell wrote:
> > > I've always thought rsync missed a feature by not having an option to
> > > move files - that is, delete the source (only) after a successful
> > > transfer.  But, it is pretty reliable and a lot easier to script around
> > > than other file transfer methods.
> >
> > rsync exits non-zero if the transfer is not successful. What's wrong
> > with:
> >
> > rsync -avP -e ssh /foo root dest:/foo && rm -f /foo
> >
> > --
> > Dan Young <dyoung mesd k12 or us>
> > Multnomah ESD - Technology Services
> > 503-257-1562
> >
> > _______________________________________________
> > K12OSN mailing list
> > K12OSN redhat com
> > https://www.redhat.com/mailman/listinfo/k12osn
> > For more info see <http://www.k12os.org>
> Thanks, Dan.  OK, I had considered rsync.  If I've set up my system to do
> automatic authentication for an scp session, does that carry over to rsync
> (or is the attending ssh covered)?  D you understand my question (I just
> barely do  :-)  )?
> Dimitri

Well actually, on second thought, I want my script to check to see if the file 
from the business partner is has been uploaded - the partner can be delayed, 
hence no file to transfer.  The script is set to fire off at 9:10PM via cron.  
So, the transfer part of the script says "if the file isn't here, wait 15 
minutes, then transfer, otherwise transfer".  In theory, that should give the 
partner enough time to get the result file to us.  However, that's not 
fool-proof - the partner could be delayed more than 15 minutes.  So, from 
what I've read, maybe a "do while" construct would work better.  But, of 
course, I'm not sure how to write that either.  Anyway, if I use the "if 
then" contruct, as I currently have in my script, it still leaves me with 
finding a way to verify transfer.


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]