[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Clone machine: what after apt-get dselect-upgrade?



I want to make and maintain a backup machine for my home network.  Normally, it will be
another DNS secondary, and secondary MX, but otherwise be a clone of the main machine which 
happens to include things like webmail, https, imaps.

The idea is:

If the primary machine failed for some reason I'd like to be able to change IP and hostnames
on the backup to quickly replace the primary machine.  No plan for automatic fail-over at
this time -- nothing mission critical on the home lan ;).

I had a spare P3 550 around and a spare 80GB IBM Deskstar (a bit overkill for disk space for
this machine) and a pair of 3C509C ethernet cards.

I did a base install of Woody from CD-ROM, then installed ssh, and then copied over from the 
source machine the output from dpkg --get-selections, and the .deb files in the archive.  
Then on the new machine:

   # dpkg --set-selections < source.selections
   # apt-get dselect-upgrade

And that went well.

Now, what's the best way to get the configurations to be the same?  


Well, almost the same:

- It will have a different static IP, of course (/etc/network/interfaces)
- It will have a different name (/etc/hostname)
- DNS will run as a slave not a master
- Exim will run as a secondary[1]


Seems like a job for rsync[2].  I have not used rsync in a while.  I'm also now sure what of
the security issuse are with using rsync to sync files that need root on the remote machine.




[1] What I've done for years with an old P90 that was running secondary MX is use a .forward
to forward mail to the primary.  If I need to take down the primary I first ssh into the
secondary and disable the .forward.  That allows me to read my mail on the secondary while
the primary is down.

[2] I've looked at http://www.systemimager.org/, but seems like overkill for my needs.

-- 
Bill Moseley
moseley@hank.org



Reply to: