Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2001 17:33:32 -0700
From:      Sean Chittenden <sean@chittenden.org>
To:        Odhiambo Washington <wash@wananchi.com>
Cc:        FBSD-Q <freebsd-questions@freebsd.org>
Subject:   Re: Tar over ssh crontab - how ?
Message-ID:  <20011003173330.C84600@rand.tgd.net>
In-Reply-To: <20011003192002.E16935@ns2.wananchi.com>; from "wash@wananchi.com" on Wed, Oct 03, 2001 at = 07:20:02PM
References:  <20011003192002.E16935@ns2.wananchi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--JYK4vJDZwFMowpUq
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 t=
hat I need to run
> via a cron entry.
> On the command line it runs file but in cron nothing happens absolutely.
>=20
> Please help.
>=20
> The command is:
>=20
> /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 )'
>=20
> The cron entry that doesn't work is:
> 18      40      *       *       *       root    /home/wash/Administration=
/backup-ns2.sh > /var/log/ns2-backup.log 2>&1
>=20
> A real testrun gives....
>=20
> ns2# ./backup-ns2.sh=20
> /usr/bin/tar: Removing leading / from absolute path names in the archive.
> ns2#
>=20
> I really need to either log the output or mail it to myself.
>=20
> MTIA

Hmm...  I've never done this with ssh, but I know you can do this over
kerberized rsh (encrypted/secure rsh) if you get a non-expiring ticket. =20
It takes some reading, but ports/security/krb5 is pretty cool.  -sc

--=20
Sean Chittenden

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

-----BEGIN PGP SIGNATURE-----
Comment: Sean Chittenden <sean@chittenden.org>

iEYEARECAAYFAju7rlYACgkQn09c7x7d+q3O0gCfVF0aJlcU7DFiyRe5z3m/3nd5
5AAAn1qJcrmJmaKxtPijauVaYr21e458
=fsTb
-----END PGP SIGNATURE-----

--JYK4vJDZwFMowpUq--

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?20011003173330.C84600>