Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Oct 2005 11:39:07 +0200
From:      Olaf Greve <o.greve@axis.nl>
To:        freebsd-amd64@freebsd.org,  freebsd-questions@freebsd.org
Subject:   How to best set-up a small local 'sync' network next to the live network?
Message-ID:  <43439F3B.1040903@axis.nl>
In-Reply-To: <cb5206420510050050w6f0e6174w85ca579fd4079380@mail.gmail.com>
References:  <ED4C536E-48C1-11D9-B2C4-000A2791B6EC@illusionart.com>	<433D3C12.6020104@axis.nl> <200510041717.10435.peter@wemm.org>	<200510050226.37436@harrymail> <cb5206420510050050w6f0e6174w85ca579fd4079380@mail.gmail.com>

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

At present I'm in the last stages of configuring my new (primary) web 
server. As soon as I'm done with it, I want to place the machine at the 
server farm, connect it to the present live server, take the later one 
off-line for an hour or so, hook it up via local network to the new 
primary server, rsync the necessary files, and update the MySQL DB.

Once that's done, I'll simply swap the external (i.e. "world") IP 
addresses of both machines, and then the new primary server should be 
pretty much up and running.

Now, what I'd like to do, is: make the current live server a fall-back 
machine (connected to the outside world, but normally never mapped via 
DNS entries, unless the primary server goes down, and I assign the IP 
address of the live machine to the fall-back machine).

What I'd like to do as a strategy is the following:

Primary server:
- Runs FreeBSD 5.4-Release AMD64
- Connected to outside world via NIC 1 @ a real IP address; say 
123.45.67.89, publicly available as webserver incl. DNS mappings, etc.
- Connected via a cross-wire cable to fall-back machine via NIC 2 ; 
using address 192.168.1.1

Fall-back server:
- Runs FreeBSD 5.2.1-Release i386
- Connected to outside world via NIC 1 @ a real IP address; say 
123.45.67.88, "privately" available by IP address only (mainly for SSH 
access, serves as fall-back and staging machine)
- Connected via a cross-wire cable to primary server machine via NIC 2 ; 
using address 192.168.1.2


Now, the machines are (obviously) not the same hardware wise, nor OS 
wise. I may (or may not) decide to install FreeBSD 5.4-release i386 on 
the fall-back server, or I may just leave that "as is".

The things I'm wondering about are the following:
-How can I best set-up such a dual network configuration, such that one 
network will not interfere with the other?
-Can I somehow 'force' the machines to automatically interpret anything 
in the 192.168.1.x range to be local, and hence automatically use NIC 2, 
instead of using the NIC 1 adapter (which handles my outside world traffic)?
-Is it sufficient to set-up the Rsync daemon on the primary machine to 
only allow connections from 192.168.1.2, and to run as root, such that I 
can easily use the cross-wire as a kind of direct tunnel to perform the 
syncing?
-What is the nicest MySQL replication mechanism? Presently I use a 
mechanism that dumps the MySQL DB instances, and will then push them 
over an SSH tunnel to the fall-back machine, directly loading them into 
the MySQL DB on that machine. Is MySQL's master-slave syncing perhaps a 
better choice?

Cheers, and thank in advance for any and all replies!
Olafo



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