public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] rsync script
Date: Fri, 21 Mar 2008 14:22:32 +0200	[thread overview]
Message-ID: <200803211422.32490.alan.mckinnon@gmail.com> (raw)
In-Reply-To: <6b16fb4c0803210033u602d385fx240c1d90db9b844c@mail.gmail.com>

On Friday 21 March 2008, Kaushal Shriyan wrote:
> On Fri, Mar 21, 2008 at 12:56 PM, Alan McKinnon
> <alan.mckinnon@gmail.com>
>
> wrote:
> > On Friday 21 March 2008, Kaushal Shriyan wrote:
> > > Hi
> > >
> > > MAILTO=kaushal@example.com
> > > 0 18 * * * rsync -av /var/lib/mysql kaushal@host77:/var/lib/
> > >
> > > If i put this two lines in crontab it will run correctly,My
> > > requirement was to create a script, this script should indicate
> > > success or failures and the reason for failure
> >
> > crontab will only send a mail is there is anyput to stdout. What
> > output do you get if you run the rsync manually?
>
> Hi Alan
>
> When i run the rysnc command by hand, it runs successfully without
> any issues. I can see it on stdout saying building list files........
> and then the rsync process

Most likely cause is that he shell that crontab runs in is NOT the same 
shell as your user account and does not have the same PATH.

Solution: never rely on PATH in a crontab, supply the full PATH 
yourself. Try calling rsync as /usr/bin/rsync as see if that fixes it

> > Do you have any packages installed that can actually send the mail?
>
>  I did not understand this question

crontab does not do SMTP, it does not know how to send mail. You need a 
mailer to be installed - like sendmail or mail


-- 
Alan McKinnon
alan dot mckinnon at gmail dot com

-- 
gentoo-user@lists.gentoo.org mailing list



  parent reply	other threads:[~2008-03-21 12:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-21  6:52 [gentoo-user] rsync script Kaushal Shriyan
2008-03-21  7:26 ` Alan McKinnon
2008-03-21  7:33   ` Kaushal Shriyan
2008-03-21  8:33     ` Collin Starkweather
2008-03-21  8:59       ` Kaushal Shriyan
2008-03-21  9:38         ` Collin Starkweather
2008-03-21 12:22     ` Alan McKinnon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-04 10:05 Kaushal Shriyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200803211422.32490.alan.mckinnon@gmail.com \
    --to=alan.mckinnon@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox