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

Re: Tool for changing ips in all needed config files...



On Wed, 3 Dec 2003, Michael Loftis wrote:

> cfengine is a tool built for this sort of thing.  It allows you to apply
> and configure systems while still maintaining their identities.  It's a
> very complicated tool though FYI.
>

First of all, sorry for my english, I'm not quite goot yet!



I've didit something similar on 2 of my machines at home, with rsync.
I think i've found a nice solution, with good benefits, so I will try
to explain it.

The main question, was to have a full backup of my server, wich
has a 80 Gb HD full of data. (please, don't ask what data! :-)

So, I've picked another similar machine, (not necessary to be identical
to the server) the "backup", with another 80 Gb HD. Another "must", was
that this machine colud be on and online togheter with the server on the
lan, so it must have another name and another IP. If it also boots on a
diferent runlevel than the server, it can start a diferent set of
services.

Then, when I want to have the "backup" machine up to date with
the "server", I launch that script on the "backup" machine:

/usr/bin/rsync --archive --delete --hard-links --exclude-from
/excludelist server::sb /

So, it 'sync's the machine "backup" to be identical of machine "server",
using the rsync server "sb", except this archives (this is the contents
of the file /excludelist):

/cdrom/*
/dev/pts
/etc/hostname
/etc/inittab
/etc/network/interfaces
/floppy/*
/lost+found
/mnt/*
/proc/*
/tmp/*

As you can see, I must manually mantain 'hostname', 'inittab', and
'interfaces' (this is on Debian, other dist's can be diferent), to have
a diferent host name, runlevel, and IP.

Benefits:

I can have the "backup" machine, on on the lan, doing diferent things
from the server.

Maintaining the server updated and upgraded, at next 'rsync' the "backup"
will be upgraded too.

I can try anything on the "backup". When it gets too much trashed, i
launch a 'rsync', have a tea, and I have the "backup" ready again for
anything: the two machines are Pentium 166 clones, and if there are
not too much new files on the server, to sync the full 80 Gb, it lasts
10 - 15 minutes :-)

If the server breaks, modifiyng the 3 files, I can plug the "backup"
machine on the "server" place, and be online aganin in minutes, (from the
last time i've did a rsync, of course).

Totally scalable!

It's like a sort of "quick and simple manual high availability" :-)

I have'nt did any automatic process for the 'rsync' backup, I always do
manually. So if there is some problem on the server, any autmatic process
will trash the backup machine. Only me, if I don't see the problem
before i launch a 'rsync'... :-)

I hope this can help somebody!

....

And now, I have a question... :-)

I recently upgraded my desktop with a Intel D865GBF MB, P4 HT
2.4, a 80 Gb HD (ST380011A) and 1 Gb RAM (4 * 256 Mb. Kingston).

I've compiled vanilla kernel 2.4.22 over Debian testing, ext3,
with ACPI, HT, and UDMA, all running like a jet: + 50 Mb second
HD access!.

But after some weeks, the ext3 fs trashed! I reboot in single
user, fsck'ed, and more or less, repaired the damage. From there,
I deactivated the HT, ACPI and UDMA, (now the HD runs at 5 Mb sec. :-),
and have not suffered more data corruption.

Has somebody hear some problem with that configuration?

Thanks for all!


      K


> --On Wednesday, December 03, 2003 21:24 +0100 listbot@gmx.de wrote:
>
> > Hi,
> >
> > is there a tool to change all occurences of a servers ip-address?
> >
> > I am trying to sync some servers and want to use ONE basic
> > configuration for all. Only difference now is the ip in some files in
> > /etc, that somehow complicates the simple concept of rsyncing all
> > servers from a master server.
> >
> > I am sure that someone had this problem before. Could you point me to
> > some interesting solutions?
> >
> > Thank you very much for your attention!
> >
> >
> > Peter
> >



Reply to: