From owner-freebsd-questions@FreeBSD.ORG Fri Sep 5 13:55:52 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2343916A4C0 for ; Fri, 5 Sep 2003 13:55:52 -0700 (PDT) Received: from mail.aynassociates.com (ngbert.aynassociates.com [66.139.79.227]) by mx1.FreeBSD.org (Postfix) with SMTP id 00FC243FB1 for ; Fri, 5 Sep 2003 13:55:49 -0700 (PDT) (envelope-from ayn@mail.aynassociates.com) Received: (qmail 18377 invoked by uid 1003); 5 Sep 2003 20:55:48 -0000 Date: Fri, 5 Sep 2003 15:55:48 -0500 From: Andrew Y Ng To: Matthew Seaman , Brent Bailey , questions@freebsd.org Message-ID: <20030905205548.GA18346@AndrewNg.com> References: <1141.66.63.97.2.1062787167.squirrel@bmyster.com> <20030905200024.GA45683@happy-idiot-talk.infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <20030905200024.GA45683@happy-idiot-talk.infracaninophile.co.uk> User-Agent: Mutt/1.3.28i X-GPG-Fingerprint: 46A1 29FF 893A 0381 DC81 1E1E BED8 E882 9BFC 594C X-GPG-Info: gpg --keyserver pgp.mit.edu --recv-keys 9BFC594C X-Copyright: (C) 2003 Andrew Y Ng. Forwarding not permitted without prior permission. Subject: Re: rsync install help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2003 20:55:52 -0000 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I would also look into keychain, this way u won't have to have a passphrase-less ssh key... i rsync a bunch of stuff in cron with ssh and keychain: 25 2 * * * . ~/.ssh-agent-${HOSTNAME} && rsync -av /foo/* bar.foo.= com:foo/ /ayn On 0, Matthew Seaman wrote: > On Fri, Sep 05, 2003 at 02:39:27PM -0400, Brent Bailey wrote: > > Im using FBSD 4.8rc1 ..IM getting ready to install rsync to help with > > mirroring to another redundant FBSD box. I was wondering if anyone could > > point me a a good howto for this ? >=20 > Oooh... an easy one. >=20 > # cd /usr/ports/net/rsync > # make install > =20 > > any and all help is greatly appreciated >=20 > Actually, I guess you aren't asking so much about how to install > rsync(1), as how to do the mirroring to the second machine. >=20 > The thing to realise is that rsync on FreeBSD runs over ssh(1) by > default. Presumably you want the rsync job to happen automatically, > which means you need to set up a mechanism by which ssh(1) can > authenticate to the other machine without stopping to input a > password. >=20 > That's explained here: >=20 > http://www.snailbook.com/faq/no-passphrase.auto.html >=20 > Once you've got the authentication bit working, then it's simply a > matter of running something derived from this at regular intervals: >=20 > #!/bin/sh >=20 > remote=3D"sparehost.example.com" >=20 > fslist=3D"/ /usr /home" >=20 > for fs in $fslist ;=20 > do > rsync -azx --delete ${remote}:${fs}/ ${fs}/ > done >=20 > Note that you'll need to run as root on both ends of the connection, > which implies that you'll be allowing root access without a password > from one machine to the other, so you need to pay attention to the > features available in the authorized_keys file to ameliorate the > damage possible should the key be stolen. >=20 > Cheers, >=20 > Matthew >=20 > --=20 > Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks > Savill Way > PGP: http://www.infracaninophile.co.uk/pgpkey Marlow > Tel: +44 1628 476614 Bucks., SL7 1TH UK --=20 andrew y ng http://andrewng.com independent computer consultants http://aynassociates.com --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/WPhUvtjogpv8WUwRAgHOAJ0eWiCguPdS57nbdef5wVw4ciH24gCgsfna RN9Id9AIybtYWtaRyOsJE54= =VW9U -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--