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

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



Bill Moseley wrote:
> 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.

[Please word wrap your messages at an appropriate column such as 72.
It makes it much easier to read your messages then.  Thanks.]

> 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.

Sounds like you are well on your way.  The above is exactly what I
would have suggested.

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

All of the configuration will be in /etc.  If you copy/compare them
you will have two machines with the same configuration and
functionality.

> 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]

Except for this I would have said just rsync the data from one on top
of the other.  Which is how I do a restore from backup.  But you need
to pick and choose.

> 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.

As far as security is concerned I don't like passing passwords around
an unsecured network and so I always use RSA keys in that case.
Otherwise you should be fine.

Pull a complete copy of the primary machine over to the secondary
machine.  Then 'diff -r /etc /etc.primary' and resolve any differences
that you need to do to bring the machines into alignment.

Or alternately save off the secondary configuration, put your primary
copy in place.  This way they start off exactly the same, then install
your configuration for the places you noted needed to be different.
It is six of one and a half dozen of the other and your choice as to
how you want to do it.

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

Agreed.  But don't forget SystemImager is just a heavy user of rsync.
By having a running system you are past the step that would make use
of this.  However, in the future instead of installing from scratch
you could do your own rsync imaging and make an exact copy of the old
machine onto the new machine using KNOPPIX and rsync with all of the
manual steps.  This is all that SI is doing, automating all of those
manual steps.

Bob

Attachment: pgplQDjaPonx0.pgp
Description: PGP signature


Reply to: