PDA

View Full Version : How to replace ip adresses in A DNS records all at once?


radim_h
19th March 2008, 15:24
Hello,
i'm going to migrate my ISPConfig server to different provider with different IP range, togehter with other servers

in Ispconfig DNS manager i have 150+ A records which are using more different IP adresses (ISPConfig server is authoritative DNS for itself and for more other servers)

How should i replace one IP adress for all related sites without clicking them in DNS manager?
I was looking into ispconfigdb structure, but haven't understand the structure of DNS in MySQL clearly (there is just few lines in "dns_a" table)

I will also need to change IP for sites in ISPconfig site manager
(menu ISP Manager->Sites-><i>Select Site</i>->Basis->IP adress

can anyone help me?

Assuming i have to change something in MySQL ispconfig database, how to force then the ISPConfig reread configuration from MySQL ?

:confused:

zcworld
19th March 2008, 15:47
this if your BIG TIME GAMED TO PLAY CHICKEN

MAKE SURE YOU GOT FULL SQL BACKUP in CASE ALL GOES TO HELL!


the way i done mine
when my box IP changed and sent all of myDNS recoards out of order

i done an sql dump of the myDNS and
open it up in context ( a notepad editor)
and found my 192.168.1.109 and replaced it with 192.168.1.103
saved it and reloaded it into my sql server
and
DNS -> IP updated

FULL SQL BACKUP in case you do this and stuff up

radim_h
19th March 2008, 22:01
that seems to be a really dirty solution .)
perhaps anyone has a better idea ?

btw:zcworld, how did you that force the ISPConfig to change config files?
is restarting ispconfig_server service enough ?

falko
20th March 2008, 16:19
that seems to be a really dirty solution .)
perhaps anyone has a better idea ?But it should work. :)

btw:zcworld, how did you that force the ISPConfig to change config files?
is restarting ispconfig_server service enough ?
Try this:

UPDATE dns_isp_dns SET status = 'u';

Then on the command line run
touch /home/admispconfig/ispconfig/.run

radim_h
20th March 2008, 17:03
Originally Posted by radim_h
that seems to be a really dirty solution .)
perhaps anyone has a better idea ?

falko:
But it should work.

So is there options to chaneg IPs by SQL command anyhow ?

falko
20th March 2008, 19:04
So there is no option chaneg IPs by SQL command anyhow ?
Of course, you can do that, but you might miss some records that contain the old IP.

radim_h
26th March 2008, 13:12
Thank you for advices!

I'd realy like to update DNS records in MySQL shell, instead of replacing in notepad, can you tell me in which tables do i have to set new IP adress ?
Are IP adresses also on different place then tables "dns_a" and "dns_isp_dns" ?