Skip site navigation (1)Skip section navigation (2)
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>

index | next in thread | raw e-mail

[-- Attachment #1 --]
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.

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 
hang yourself with the cord. 
(contributed by Chris Johnston) 

[-- Attachment #2 --]
-----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-----
help

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