transfer all sites to new ip

rich2

Well-Known Member
Apr 9, 2002
64
0
306
we are losing some IP's on our server and need to transfer all our named-based sites to a new IP

What would be the BEST way to go about this?

Just looking for some advice before we go about this.

My guess would be, make all accounts under 1 reseller, change that resellers named-based ip use to the IP we are moving to... will that change everyone over? zone files and apache records??


anyone know? am i on the right track?
 

thomas

Well-Known Member
Mar 31, 2002
70
0
306
[quote:65a1c915f1][i:65a1c915f1]Originally posted by rich2[/i:65a1c915f1]
...make all accounts under 1 reseller, change that resellers named-based ip use to the IP we are moving to... will that change everyone over? zone files and apache records??
[/quote:65a1c915f1]

No it won't.

Easiest way would be search and replace.

In a ssh session, try this:

cd /var/named/

perl -p -i -e 's/oldip/newip/gi' * (example: perl -p -i -e 's/10.10.10.10/20.20.20.20/gi' *)

cd /etc/httpd/conf/

perl -p -i -e 's/oldip/newip/gi' httpd.conf (example: perl -p -i -e 's/10.10.10.10/20.20.20.20/gi' httpd.conf)

And restart bind and apache.

This should do the trick, I take no responsibility though, do at your own risk.
 

rich2

Well-Known Member
Apr 9, 2002
64
0
306
thanx, i am gonna test this i think on a dummy server and some records before taking it on the production server
 

moronhead

Well-Known Member
Aug 12, 2001
706
0
316
[quote:fb410ac8f4][i:fb410ac8f4]Originally posted by dgbaker[/i:fb410ac8f4]

Just to add - You also need to do this in
/var/cpanel/users

This is were the package info for each domain is held and it does contain the ip's as well.
[/quote:fb410ac8f4]Are you sure? This is new to me.
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
10
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
[quote:65fa3006c6][i:65fa3006c6]Originally posted by moronhead[/i:65fa3006c6]

[quote:65fa3006c6][i:65fa3006c6]Originally posted by dgbaker[/i:65fa3006c6]

Just to add - You also need to do this in
/var/cpanel/users

This is were the package info for each domain is held and it does contain the ip's as well.
[/quote:65fa3006c6]Are you sure? This is new to me.[/quote:65fa3006c6]

Yep, just looked at one of mine. And the IP is listed.