Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2001 20:49:47 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Sean Chittenden <sean@chittenden.org>
Cc:        Odhiambo Washington <wash@wananchi.com>, FBSD-Q <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Tar over ssh crontab - how ?
Message-ID:  <20011003204947.K8391@blossom.cjclark.org>
In-Reply-To: <20011003173330.C84600@rand.tgd.net>; from sean@chittenden.org on Wed, Oct 03, 2001 at 05:33:32PM -0700
References:  <20011003192002.E16935@ns2.wananchi.com> <20011003173330.C84600@rand.tgd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011003204947.K8391>