Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2003 00:02:03 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Create a "hot backup" server machine?
Message-ID:  <20030330230203.GB50691@happy-idiot-talk.infracaninophi>
In-Reply-To: <v04210106baad1dcad428@[192.168.1.27]>
References:  <v04210106baad1dcad428@[192.168.1.27]>

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

--A6N2fC+uXW/VQSAv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 30, 2003 at 05:18:54PM -0500, Ralph Dratman wrote:
> I'm trying to create an offsite "hot backup" of a FreeBSD server. If=20
> the primary server fails, I want to transport the spare machine to=20
> the existing site and bring it up as a replacement, with little or no=20
> reconfiguration necessary.
>=20
> Nightly mirroring would be adequate in this situation. The system is=20
> not running live transaction processing or anything comparable.
>=20
> Is there a straightforward, automated way to mirror a whole FreeBSD=20
> system, using open source software?
>=20
> I'm testing ftpcopy to remotely mirror the files and directories.=20
> Ftpcopy performs an incremental comparison using dates and file=20
> sizes, which should minimize the nightly backup time and traffic=20
> load. So far that part seems to be working well.
>=20
> But I haven't figured out how to get the users, groups and=20
> permissions mirrored. There are about 200 users. And there may be=20
> other gotchas I haven't thought of yet.

Sounds to me like this is a job for rsync(1) --- see
http://rsync.samba.org/ or net/rsync in ports.  You can use rsync to
maintain a remote copy of a partition, as you describe.  rsync(1) will
transmit only the minimum necessary over the wire in order to bring
the two filesystems into synch.  Eg. to save or update a copy of the
/var partition on your live server to a backup machine:

    # rsync -avx --delete /var/ backup.example.com:/backups/var/

By default on FreeBSD, rsync(1) will use ssh(1) for remote shell
access.  For unattended access you probably need to set up appropriate
ssh keys without passwords, but definitely limiting access based on
the 'from=3D' hostname and/or command used via options in the
~/.ssh/authorized_keys file, as described in the 'AUTHORIZED_KEYS FILE
FORMAT' section of sshd(8) -- you should also turn off the three types
of forwarding with an autologin key.  See also
http://www.snailbook.com/faq/no-passphrase.auto.html

	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

--A6N2fC+uXW/VQSAv
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+h3drdtESqEQa7a0RAg4AAJ4goMkjLLbHpZozlr3+UgV6FWrrhACaA9vz
sxxNOqPWeOPubVQUIb1CgPc=
=t9L7
-----END PGP SIGNATURE-----

--A6N2fC+uXW/VQSAv--



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