[K12OSN] RSYNC Question

Julius Szelagiewicz julius at turtle.com
Thu Mar 11 13:22:01 UTC 2004


On Thu, 11 Mar 2004, Jim Kronebusch wrote:
> Thanks a lot.  This is just what I needed.  I am not quite ready to try
> it yet but you have given me a good path to follow when I get there.
>
> Jim Kronebusch wrote:
> > I have seen some stuff referring to rsync with backing up servers.
> > Can
> > anyone tell me how this works?  Can I use this to make an exact copy
> of
> > my running production server to a backup server of either equal or
> > lesser hardware.  Idea being that upon hardware failure of the
> > production server I would have an up to date backup (or possibly only
> > 24hrs behind) to swap in and run as a temporary production server
> until
> > the main hardware was repaired.  Let me know if this is feasible
> (maybe
> > I need identical hardware) and if so where to start (what commands to
> > issue).  Ideally I would like to have the two machines running a
> > scheduled periodic backup that was automatic and did not require any
> > manual intervention.
> >
> > Thanks
>
> This is perhaps a question that is too large to be handled in one email,
>
> but I can probably shed some light.
>
> The common term for this setup is a 'hot spare', in a totally hands off
> redundant system, there would be a 'heartbeat' running between the main
> server and the spare. if the main servers heartbeat stops, the second
> server essentially changes its IP address and becomes the new main
> server.  This is probably a little more involved than you really
> require.  As long as you don't mind doing a little bit of 'hands on'
> work to bring up your spare. The same result can be obtained using some
> forethought,'cron' and 'rsync'.
>
> If you have a second server which can handle all of the same tasks (or
> some subset of critical tasks)you can set that server up with the same
> services enabled and ready to go.  This is where 'rsync' and 'cron' come
>
> in to play.  Set up an 'rsync' command to synchronize the critical data
> from the main server (home directories, mail spool, web content etc) to
> the spare server.  Use 'cron' to run the 'rsync' command on a regular
> basis (once a day, once an hour, depends on your needs). this will keep
> the data up to date on the spare server.  Then on the spare server I
> would create a 'swapserver' script to change the IP address to that of
> the main server, and enable the services required.
>
> Once all that is in place, then all you would need to do to swap in the
> server in the event of a failure would be to log in to the spare and run
>
> the 'swapserver' script.
>
> You could do some googleing for terms like 'hot spare' 'heartbeat' and
> 'disaster recovery'  for some additional info.
>
> Paul Davison

I'd like to add an important caveat to Paul's response: the "swapserver"
script needs to be tested and retested until you are really satisfied that
it works as advertised. Another important caveat: make absolutely,
positively sure that the "downed" server stays down, otherwise you *will*
have network havoc. I've learned the hard way not to pretend that the main
server is up (see preceding), but to have scripts enabling access to the
secondary server in case the primary goes away. just my $0.02. julius





More information about the K12OSN mailing list