From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JcgH7-0005Hi-Jz for garchives@archives.gentoo.org; Fri, 21 Mar 2008 12:23:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1760DE0DA5; Fri, 21 Mar 2008 12:23:08 +0000 (UTC) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by pigeon.gentoo.org (Postfix) with ESMTP id BB7BEE0DA5 for ; Fri, 21 Mar 2008 12:23:07 +0000 (UTC) Received: by mu-out-0910.google.com with SMTP id i10so1881218mue.5 for ; Fri, 21 Mar 2008 05:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=UtGmrdf+/n3SwN8RZ1xs3o3kLeE07ZKNZaqtB9Kj3WI=; b=qhZjWr+Tqwih6QxXm1KMy4mRQKY9PaF4CCCANBuW6Lc6vVzQaZtXjpe3QLl0NRDuywHEnG6VPXrssQNO+q0E+3p6xvmDvNsOcZaXLdEC0o1lVEIc0QUINrChsF68naf96kYEp5TjQCmTelgs7j58Y83QlE69gL56shM4B5gDinM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=cbPK9Wtw1TrjfQNDUr7WYxVpf8OjSF+EKsYxA6Hd4q27qUsb8KHasOIHPbDmf5d/k1kxQ1pGYx2TSe0RQflMcDwFvAsSAsVIGp8yT2hbsbWJT/vn6ZwnipmnyUSLKfiuj+SQItK+a73wkHDv3U0AlZ+fhvBZy7Zglyuu3Wm51LY= Received: by 10.78.202.19 with SMTP id z19mr8504462huf.67.1206102186864; Fri, 21 Mar 2008 05:23:06 -0700 (PDT) Received: from ?10.0.0.3? ( [41.243.250.63]) by mx.google.com with ESMTPS id 16sm1790100hui.34.2008.03.21.05.23.04 (version=SSLv3 cipher=OTHER); Fri, 21 Mar 2008 05:23:05 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] rsync script Date: Fri, 21 Mar 2008 14:22:32 +0200 User-Agent: KMail/1.9.9 References: <6b16fb4c0803202352g75b851c5q93b23c5ab6c15093@mail.gmail.com> <200803210926.46936.alan.mckinnon@gmail.com> <6b16fb4c0803210033u602d385fx240c1d90db9b844c@mail.gmail.com> In-Reply-To: <6b16fb4c0803210033u602d385fx240c1d90db9b844c@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803211422.32490.alan.mckinnon@gmail.com> X-Archives-Salt: b502893e-c8da-463a-bd5e-19f130ed1c64 X-Archives-Hash: a7a91ab75d4e9953f454b00bf091ad67 On Friday 21 March 2008, Kaushal Shriyan wrote: > On Fri, Mar 21, 2008 at 12:56 PM, Alan McKinnon > > > 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