From owner-freebsd-isp@FreeBSD.ORG Tue Mar 8 21:33:32 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39F1A106566C for ; Tue, 8 Mar 2011 21:33:32 +0000 (UTC) (envelope-from charles@hatvany.com) Received: from forty.hatvany.com (forty.hatvany.com [69.26.110.230]) by mx1.freebsd.org (Postfix) with ESMTP id B22E28FC22 for ; Tue, 8 Mar 2011 21:33:31 +0000 (UTC) Received: from [127.0.0.1] ([10.0.0.254]) by forty.hatvany.com (8.11.6/8.11.6) with ESMTP id p28KqTi30456 for ; Tue, 8 Mar 2011 15:52:29 -0500 (EST) (envelope-from charles@hatvany.com) Message-ID: <4D769700.2070309@hatvany.com> Date: Tue, 08 Mar 2011 15:52:16 -0500 From: Charles Hatvany User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-isp@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 21:33:32 -0000 Hi, I am not sure if there is a better place to ask this question. I have a shell script (single line): rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ root@10.0.0.232:/usr/home > /etc/rsync/output which works fine if I run it from a prompt as: ./etc/rsync/sync and produces output as expected to file /etc/rsync/output. crontab contains (single line): 0,10,20,30,40,50 * * * * root /etc/rsync/sync Cron log shows: Mar 7 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sync) BUT, output contains nothing (assuming I reset it to that before cron executes the job. Any ideas or a better place to ask this or a way to debug it? Thanks, Charles Hatvany Hatvany.Net From owner-freebsd-isp@FreeBSD.ORG Tue Mar 8 21:39:45 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D8D3106564A for ; Tue, 8 Mar 2011 21:39:45 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1B81E8FC0A for ; Tue, 8 Mar 2011 21:39:44 +0000 (UTC) Received: from mac2.unsane.co.uk (mac2.unsane.co.uk [10.10.10.191] (may be forged)) (authenticated bits=0) by unsane.co.uk (8.14.4/8.14.4) with ESMTP id p28Ldh4g017985 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 8 Mar 2011 21:39:44 GMT (envelope-from vince@unsane.co.uk) Message-ID: <4D76A21F.1000403@unsane.co.uk> Date: Tue, 08 Mar 2011 21:39:43 +0000 From: Vincent Hoffman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 MIME-Version: 1.0 To: Charles Hatvany References: <4D769700.2070309@hatvany.com> In-Reply-To: <4D769700.2070309@hatvany.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-isp@freebsd.org Subject: Re: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 21:39:45 -0000 Try using the full path to rsync. Vince On 08/03/2011 20:52, Charles Hatvany wrote: > Hi, > > I am not sure if there is a better place to ask this question. I have > a shell script (single line): > > rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ > root@10.0.0.232:/usr/home > /etc/rsync/output > > which works fine if I run it from a prompt as: > > ./etc/rsync/sync > > and produces output as expected to file /etc/rsync/output. > > crontab contains (single line): > > 0,10,20,30,40,50 * * * * root > /etc/rsync/sync > > Cron log shows: > > Mar 7 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sync) > > BUT, output contains nothing (assuming I reset it to that before cron > executes the job. > > Any ideas or a better place to ask this or a way to debug it? > > Thanks, > > Charles Hatvany > Hatvany.Net > > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" From owner-freebsd-isp@FreeBSD.ORG Tue Mar 8 22:01:52 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1371065675 for ; Tue, 8 Mar 2011 22:01:52 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id EB4C58FC08 for ; Tue, 8 Mar 2011 22:01:51 +0000 (UTC) Received: from park.js.berklix.net (p5B22E3DF.dip.t-dialin.net [91.34.227.223]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p28LhCHA021017; Tue, 8 Mar 2011 21:43:14 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id p28Lh7iA087432; Tue, 8 Mar 2011 22:43:07 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id p28Lgv4Q087786; Tue, 8 Mar 2011 22:43:02 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201103082143.p28Lgv4Q087786@fire.js.berklix.net> To: Charles Hatvany From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Tue, 08 Mar 2011 15:52:16 EST." <4D769700.2070309@hatvany.com> Date: Tue, 08 Mar 2011 22:42:57 +0100 Sender: jhs@berklix.com Cc: freebsd-isp@freebsd.org Subject: Re: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 22:01:52 -0000 Hi, Reference: > From: Charles Hatvany > Date: Tue, 08 Mar 2011 15:52:16 -0500 > Message-id: <4D769700.2070309@hatvany.com> Charles Hatvany wrote: > Hi, > > I am not sure if there is a better place to ask this question. I have a > shell script (single line): > > rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ > root@10.0.0.232:/usr/home > /etc/rsync/output > > which works fine if I run it from a prompt as: > > /etc/rsync/sync > > and produces output as expected to file /etc/rsync/output. > > crontab contains (single line): > > 0,10,20,30,40,50 * * * * root /etc/rsync/sync > > Cron log shows: > > Mar 7 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sync) > > BUT, output contains nothing (assuming I reset it to that before cron > executes the job. > > Any ideas or a better place to ask this or a way to debug it? Cron I recall does not have /usr/local/bin in path ?. Try either /usr/local/bin/rsync or add local to PATH Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text; Not quoted-printable, Not HTML, Not base 64. Reply below text sections not at top, to avoid breaking cumulative context. From owner-freebsd-isp@FreeBSD.ORG Tue Mar 8 23:08:38 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F62F1065673 for ; Tue, 8 Mar 2011 23:08:38 +0000 (UTC) (envelope-from charles@hatvany.com) Received: from gatewayone.hatvany.com (gatewayone.hatvany.com [69.26.110.235]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2268FC20 for ; Tue, 8 Mar 2011 23:08:37 +0000 (UTC) Received: from [127.0.0.1] ([10.0.0.254]) by gatewayone.hatvany.com (8.12.11/8.12.11) with ESMTP id p282QUGK058020 for ; Mon, 7 Mar 2011 21:26:30 -0500 (EST) (envelope-from charles@hatvany.com) Message-ID: <4D758AA2.1090000@hatvany.com> Date: Mon, 07 Mar 2011 20:47:14 -0500 From: Charles Hatvany User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-isp@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 23:08:38 -0000 Hi, I am not sure if there is a better place to ask this question. I have a shell script (single line): rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ root@10.0.0.232:/usr/home > /etc/rsync/output which works fine if I run it from a prompt as: ./etc/rsync/sync and produces output as expected to file /etc/rsync/output. crontab contains (single line): 0,10,20,30,40,50 * * * * root /etc/rsync/sync Cron log shows: Mar 7 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sync) BUT, output contains nothing (assuming I reset it to that before cron executes the job. Any ideas or a better place to ask this or a way to debug it? Thanks, Charles Hatvany Hatvany.Net From owner-freebsd-isp@FreeBSD.ORG Tue Mar 8 23:42:26 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06B241065673 for ; Tue, 8 Mar 2011 23:42:26 +0000 (UTC) (envelope-from evs@telod.net) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id CB3788FC14 for ; Tue, 8 Mar 2011 23:42:25 +0000 (UTC) Received: by iwn33 with SMTP id 33so6267928iwn.13 for ; Tue, 08 Mar 2011 15:42:25 -0800 (PST) Received: by 10.42.138.69 with SMTP id b5mr7144103icu.378.1299626087517; Tue, 08 Mar 2011 15:14:47 -0800 (PST) Received: from [10.18.247.247] (mobile-166-137-143-091.mycingular.net [166.137.143.91]) by mx.google.com with ESMTPS id d21sm981975ibg.21.2011.03.08.15.14.45 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 15:14:46 -0800 (PST) References: <4D758AA2.1090000@hatvany.com> In-Reply-To: <4D758AA2.1090000@hatvany.com> Mime-Version: 1.0 (iPhone Mail 8C148) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <2F81A555-8A04-42E5-A150-5373EF0EA0EE@telod.net> X-Mailer: iPhone Mail (8C148) From: Shabotinsky Edward Date: Tue, 8 Mar 2011 17:14:38 -0600 To: Charles Hatvany Cc: "freebsd-isp@freebsd.org" Subject: Re: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 23:42:26 -0000 I would look at the logs at remote host Sent from my iPhone On Mar 7, 2011, at 7:47 PM, Charles Hatvany wrote: > Hi, >=20 > I am not sure if there is a better place to ask this question. I have a s= hell script (single line): >=20 > rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ root@10.0.0.232= :/usr/home > /etc/rsync/output >=20 > which works fine if I run it from a prompt as: >=20 > ./etc/rsync/sync >=20 > and produces output as expected to file /etc/rsync/output. >=20 > crontab contains (single line): >=20 > 0,10,20,30,40,50 * * * * root /etc/rsync/sy= nc >=20 > Cron log shows: >=20 > Mar 7 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sync) >=20 > BUT, output contains nothing (assuming I reset it to that before cron exec= utes the job. >=20 > Any ideas or a better place to ask this or a way to debug it? >=20 > Thanks, >=20 > Charles Hatvany > Hatvany.Net >=20 > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" From owner-freebsd-isp@FreeBSD.ORG Wed Mar 9 00:10:37 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F697106566C for ; Wed, 9 Mar 2011 00:10:37 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id DB71E8FC08 for ; Wed, 9 Mar 2011 00:10:35 +0000 (UTC) Received: by iwn33 with SMTP id 33so3172iwn.13 for ; Tue, 08 Mar 2011 16:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=hAa9GBaA6Cx3+TG50QL01Ukwkr9YTK1QObuCXpPAx+I=; b=ndFT7BZeGSgxWaO26cHBQy9ZhhLkuJYLXTOFXX976IbbBxD8v3cPUee2D2739yUINB aw5OlyJQAy2/DAjxKC1LOZivoH0IsMNOwgnWHU4U/nXoTRCb4sotFwLLmXbwM7cooXit 3SYHQYJz64+D0+zApx9Tmyy2pgjpblbjE/3u0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=oqrX4xbn5EAV/kOyHGCPXIEPBanrRbB1PjXRzgRGqkq39wqyZUd3kwXvTz5tx1tLTb An9wWZBanAvzx7BIKkJBjtke+uTZTTwr3CIjqViASAgt1c9esrvPKMBWHqPaKV/RYUEG ewkS+PJhbM/281jthPuvLIjbCMXIWiupvBLpQ= MIME-Version: 1.0 Received: by 10.231.197.27 with SMTP id ei27mr125327ibb.198.1299627711646; Tue, 08 Mar 2011 15:41:51 -0800 (PST) Received: by 10.231.167.194 with HTTP; Tue, 8 Mar 2011 15:41:51 -0800 (PST) In-Reply-To: <4D758AA2.1090000@hatvany.com> References: <4D758AA2.1090000@hatvany.com> Date: Tue, 8 Mar 2011 15:41:51 -0800 Message-ID: From: Xin LI To: Charles Hatvany Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-isp@freebsd.org Subject: Re: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2011 00:10:37 -0000 On Mon, Mar 7, 2011 at 5:47 PM, Charles Hatvany wrote= : > Hi, > > I am not sure if there is a better place to ask this question. =C2=A0I ha= ve a > shell script (single line): > > rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ > root@10.0.0.232:/usr/home > /etc/rsync/output > > which works fine if I run it from a prompt as: > > ./etc/rsync/sync > > and produces output as expected to file /etc/rsync/output. > > crontab contains (single line): > > 0,10,20,30,40,50 =C2=A0 =C2=A0 =C2=A0 =C2=A0* =C2=A0 =C2=A0 =C2=A0 * =C2= =A0 =C2=A0 =C2=A0 * =C2=A0 =C2=A0 =C2=A0 * =C2=A0 =C2=A0 =C2=A0 root /etc/r= sync/sync > > Cron log shows: > > Mar =C2=A07 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sy= nc) > > BUT, output contains nothing (assuming I reset it to that before cron > executes the job. > > Any ideas or a better place to ask this or a way to debug it? Common problem would be rsync is not in $PATH and you didn't specified full path. Try either adding it into PATH on the crontab, or using full path and see if that helps? Cheers, --=20 Xin LI http://www.delphij.net From owner-freebsd-isp@FreeBSD.ORG Wed Mar 9 15:20:37 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 255C41065670 for ; Wed, 9 Mar 2011 15:20:37 +0000 (UTC) (envelope-from charles@hatvany.com) Received: from gatewayone.hatvany.com (gatewayone.hatvany.com [69.26.110.235]) by mx1.freebsd.org (Postfix) with ESMTP id CDD5C8FC08 for ; Wed, 9 Mar 2011 15:20:36 +0000 (UTC) Received: from [127.0.0.1] ([10.0.0.254]) by gatewayone.hatvany.com (8.12.11/8.12.11) with ESMTP id p29FxSC3062354 for ; Wed, 9 Mar 2011 10:59:34 -0500 (EST) (envelope-from charles@hatvany.com) Message-ID: <4D779AB6.7030705@hatvany.com> Date: Wed, 09 Mar 2011 10:20:22 -0500 From: Charles Hatvany User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-isp@freebsd.org References: <4D758AA2.1090000@hatvany.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2011 15:20:37 -0000 Thank you to all who have responded. The path to rsync was actually in $PATH, but that was undefined within cron. The full path did the trick. Thanks!!! Charles On 3/8/2011 6:41 PM, Xin LI wrote: > On Mon, Mar 7, 2011 at 5:47 PM, Charles Hatvany wrote: >> Hi, >> >> I am not sure if there is a better place to ask this question. I have a >> shell script (single line): >> >> rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ >> root@10.0.0.232:/usr/home> /etc/rsync/output >> >> which works fine if I run it from a prompt as: >> >> ./etc/rsync/sync >> >> and produces output as expected to file /etc/rsync/output. >> >> crontab contains (single line): >> >> 0,10,20,30,40,50 * * * * root /etc/rsync/sync >> >> Cron log shows: >> >> Mar 7 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sync) >> >> BUT, output contains nothing (assuming I reset it to that before cron >> executes the job. >> >> Any ideas or a better place to ask this or a way to debug it? > > Common problem would be rsync is not in $PATH and you didn't specified > full path. Try either adding it into PATH on the crontab, or using > full path and see if that helps? > > Cheers,