From owner-freebsd-questions Wed Oct 3 20:50:34 2001 Delivered-To: freebsd-questions@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.121.50]) by hub.freebsd.org (Postfix) with ESMTP id 1447237B403 for ; Wed, 3 Oct 2001 20:50:32 -0700 (PDT) Received: from dialup-209.247.140.64.dial1.sanjose1.level3.net ([209.247.140.64] helo=blossom.cjclark.org) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.32 #2) id 15ozWl-0003AW-00; Wed, 03 Oct 2001 20:50:28 -0700 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id f943nlX10710; Wed, 3 Oct 2001 20:49:47 -0700 (PDT) (envelope-from cjc) Date: Wed, 3 Oct 2001 20:49:47 -0700 From: "Crist J. Clark" To: Sean Chittenden Cc: Odhiambo Washington , FBSD-Q Subject: Re: Tar over ssh crontab - how ? Message-ID: <20011003204947.K8391@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <20011003192002.E16935@ns2.wananchi.com> <20011003173330.C84600@rand.tgd.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011003173330.C84600@rand.tgd.net>; from sean@chittenden.org on Wed, Oct 03, 2001 at 05:33:32PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Oct 03, 2001 at 05:33:32PM -0700, Sean Chittenden wrote: > > I have ssh setup btw two hosts for root. I have a simple backup command that I need to run > > via a cron entry. > > On the command line it runs file but in cron nothing happens absolutely. > > > > Please help. > > > > The command is: > > > > /usr/bin/nice --20 /usr/bin/tar -czf - /etc /usr/local/etc | /usr/bin/ssh HOSTB \ > > '( cd ~wash/Administration/Backups; cat > ns2_`/bin/date +\%Y%m%d`.tgz )' > > > > The cron entry that doesn't work is: > > 18 40 * * * root /home/wash/Administration/backup-ns2.sh > /var/log/ns2-backup.log 2>&1 > > > > A real testrun gives.... > > > > ns2# ./backup-ns2.sh > > /usr/bin/tar: Removing leading / from absolute path names in the archive. > > ns2# > > > > I really need to either log the output or mail it to myself. Not giving us a lot to work with here. Is the cron job being run at all? How do you know? Is there any output in /var/log/ns2-backup.log? Have you added some debugging commands in your script (as simple as some echo(1)s) to see if anything is going on? -- Crist J. Clark cjclark@alum.mit.edu cjclark@jhu.edu cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message