From owner-freebsd-questions  Wed Oct  3  9:21:42 2001
Delivered-To: freebsd-questions@freebsd.org
Received: from ns2.wananchi.com (mail.wananchi.com [62.8.64.4])
	by hub.freebsd.org (Postfix) with ESMTP id 4DB3037B407
	for <freebsd-questions@freebsd.org>; Wed,  3 Oct 2001 09:21:34 -0700 (PDT)
Received: from wash by ns2.wananchi.com with local (Exim 3.33 #1)
	id 15ookc-0006SP-00
	for freebsd-questions@freebsd.org; Wed, 03 Oct 2001 19:20:02 +0300
Date: Wed, 3 Oct 2001 19:20:02 +0300
From: Odhiambo Washington <wash@wananchi.com>
To: FBSD-Q <freebsd-questions@freebsd.org>
Subject: Tar over ssh crontab - how ?
Message-ID: <20011003192002.E16935@ns2.wananchi.com>
Mail-Followup-To: Odhiambo Washington <wash@wananchi.com>,
	FBSD-Q <freebsd-questions@freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="aZoGpuMECXJckB41"
Content-Disposition: inline
User-Agent: Mutt/1.3.22.1i
X-Disclaimer: My opinions do not necessarily represent those of my employer.
X-Fortune: Crime does not pay ... as well as politics. -- A. E. Neuman
X-Operating-System: FreeBSD 4.4-RC i386
X-Designation: Systems Administrator, Wananchi Online Ltd.
X-Location: Nairobi, KE, East Africa.
X-Uptime: 7:15PM  up 28 days,  3:10, 3 users, load averages: 0.25, 0.16, 0.06
Sender: owner-freebsd-questions@FreeBSD.ORG
Precedence: bulk
List-ID: <freebsd-questions.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/> (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-questions>
List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-questions>
X-Loop: FreeBSD.ORG


--aZoGpuMECXJckB41
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I have ssh setup btw two hosts for root. I have a simple backup command tha=
t 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 H=
OSTB \
'( 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/b=
ackup-ns2.sh > /var/log/ns2-backup.log 2>&1

A real testrun gives....

ns2# ./backup-ns2.sh=20
/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.

MTIA

-Wash

--
Odhiambo Washington
Wananchi Online Ltd.,
wash@wananchi.com 1st Flr Loita Hse.
Tel: 254 2 313985 Loita Street.,
Fax: 254 2 313922 PO Box 10286,00100-NAIROBI,KE

If you want to commit suicide you can use my razor; it's electric, but you =
can=20
hang yourself with the cord.=20
(contributed by Chris Johnston)=20

--aZoGpuMECXJckB41
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7uzqyn7LIsuxjem8RAv7LAJ0Y7XBZhJRbixYVLkCTltVGEvBr/QCgoqcU
svLmnJWZQaWW/+61ZGMxiEo=
=gQO8
-----END PGP SIGNATURE-----

--aZoGpuMECXJckB41--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message