migrating server ips

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Mar 9 23:20:08 UTC 2009


On Mon, Mar 09, 2009 at 06:22:09PM -0400, Teddy Mills wrote:
> Need to migrate a server from 1 IP to another.
> There are a number of hardcoded IPs.
>
> Is there a global search and replace function?
> or a utility say called like...ipr?
>
> ipr /etc -R 111.222.333 777.888.999
>
> recursivley replace this ip with that one starting at /etc
> I am sure this can easily be done.

But /etc could contain bind data, hosts file, nfs entries in fstab, etc.
Not everything is your IP address in there.

It does not sound like a safe thing to do.

perl -pi combined with find could certainly do it, but I wouldn't try.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list