From owner-freebsd-questions@FreeBSD.ORG Fri Sep 5 13:01:20 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 8CD9116A4BF for ; Fri, 5 Sep 2003 13:01:20 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id B593A43FF2 for ; Fri, 5 Sep 2003 13:01:14 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h85K0OQr066492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2003 21:01:06 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h85K0Obt066491; Fri, 5 Sep 2003 21:00:24 +0100 (BST) (envelope-from matthew) Date: Fri, 5 Sep 2003 21:00:24 +0100 From: Matthew Seaman To: Brent Bailey Message-ID: <20030905200024.GA45683@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Brent Bailey , questions@freebsd.org References: <1141.66.63.97.2.1062787167.squirrel@bmyster.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <1141.66.63.97.2.1062787167.squirrel@bmyster.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-11.4 required=5.0 tests=AWL,BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: questions@freebsd.org 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:01:20 -0000 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 ? Oooh... an easy one. # cd /usr/ports/net/rsync # make install =20 > any and all help is greatly appreciated 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. 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. That's explained here: http://www.snailbook.com/faq/no-passphrase.auto.html Once you've got the authentication bit working, then it's simply a matter of running something derived from this at regular intervals: #!/bin/sh remote=3D"sparehost.example.com" fslist=3D"/ /usr /home" for fs in $fslist ;=20 do rsync -azx --delete ${remote}:${fs}/ ${fs}/ done 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 =66rom 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. Cheers, Matthew --=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 --azLHFNyN32YCQGCU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/WOtYdtESqEQa7a0RAqceAJ4vk0JuisUcd1fdD46kuONuGJvR7wCfYOn2 2AbLZtpNozpa6rWRds1oFfg= =fdzk -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--