On Fri, Mar 21, 2008 at 2:36 PM, J. Peng <[EMAIL PROTECTED]> wrote:

> when running rsync with -v argument and when it get failed on
> executing, it will report the errors by itself.
> you could say my @info = `rsync -av ....` in your perl scripts and
> check the executed results in the @info.
>
> On Fri, Mar 21, 2008 at 3:07 PM, Kaushal Shriyan
> <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> >  [EMAIL PROTECTED]
> >  0 18 * * * rsync -av /var/lib/mysql [EMAIL PROTECTED]:/var/lib/
> >
> >  If i put this two lines in crontab it will run correctly,My requirement
> was
> >  to create a perl script, this perl script should indicate success or
> >  failures and the reason for failure
> >
> >  Any ideas
> >
> >  Thanks and Regards
> >
> >  Kaushal
> >
>


Hi Peng,

so in this case the perl script would look like

##########################################################
#!/usr/bin/perl -w

my @info = rsync -av /var/lib/mysql [EMAIL PROTECTED]:/var/lib/ ;
print @info;


##########################################################

Please let me know if its correct and is there any modification in the above
script

Thanks and Regards

Kaushal

Reply via email to