HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=19)
-   -   How to replace ip adresses in A DNS records all at once? (http://www.howtoforge.com/forums/showthread.php?t=21512)

radim_h 19th March 2008 15:24

How to replace ip adresses in A DNS records all at once?
 
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

ehh
 
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

Quote:

Originally Posted by radim_h
that seems to be a really dirty solution .)
perhaps anyone has a better idea ?

But it should work. :)

Quote:

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

Try this:

Code:

UPDATE dns_isp_dns SET status = 'u';
Then on the command line run
Code:

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

Quote:

Originally Posted by radim_h
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" ?


All times are GMT +2. The time now is 09:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.