Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th August 2010, 13:57
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 404
Thanks: 33
Thanked 23 Times in 18 Posts
Send a message via ICQ to radim_h
Default how to force bind reload all zones after direct change in ispc db table dns_rr?

Hello,
hope someone can help me

I have changed IP adress of my mail server.
Because there is lot of zone files , i don't want to click changes manualy for all DNS zones in ISPC
so i changed IPs directly in database as:

UPDATE dns_rr SET data='1.1.1.2' WHERE name='mail' AND data='1.1.1.1';

but all zone files in /etc/bind stays unchanged
i cannot use sed or other script to replace IP adress in zone files, as in this case serial numbers for all zones will stay the same

how can i force bind to rebuild all zone files?
ideally delete all old zone files and create new ones with new serial number
?

as there is nothing like UPDATE dns_rr SET status = 'u'; as it was in ISPC2
i probably aked once for smae thing but cannot find the thread, there was something about remoting but i have no idea how to do this

Last edited by radim_h; 29th August 2010 at 14:23.
Reply With Quote
Sponsored Links
  #2  
Old 29th August 2010, 14:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

You can not change the records directly in the database as all direct changes will be ignored. Only changes that were created trough the ispconfig interface or remoting API will work as only changes that have a event record in the sys_datalog describing the changes values will end up in the config files. If you want to use the remoting api, you will find some example files in the remote_client/examples/ subfolder of the ispconfig tar.gz file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 29th August 2010, 17:29
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 404
Thanks: 33
Thanked 23 Times in 18 Posts
Send a message via ICQ to radim_h
Default

which script can i use? can you be more specific, please ?
Reply With Quote
  #4  
Old 29th August 2010, 17:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

There are no ready made scripts. The Remoting framework is a API for developers.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 29th August 2010, 18:05
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 404
Thanks: 33
Thanked 23 Times in 18 Posts
Send a message via ICQ to radim_h
Default

so sad, all i needed is force bind to recreate all zone files with new serial..

weird thing is that i have abouut 300 lines in sys_datalog table with status "pending"
Reply With Quote
  #6  
Old 29th August 2010, 18:22
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

The status filed is not used, so the status does not matter. pending is just the default of the field in the database.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
radim_h (29th August 2010)
  #7  
Old 11th October 2013, 20:26
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

Damn I need to rebuild the cfg and now I must code a script to update the config files

Why till
__________________
Ispconfig 3 Latest Version (Stable)
Debian Squeeze (esix vm)
Reply With Quote
  #8  
Old 11th October 2013, 21:16
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

Code:
<?php
$client_id = 0;

$username = '';
$password = '';

$soap_location = 'http://localhost:8080/remote/index.php';
$soap_uri = 'http://localhost:8080/remote/';

$client = new SoapClient(null, array('location' => $soap_location, 'uri'      => $soap_uri));

$session_id = $client->login($username,$password);

$regid;

#655 top value
for ($id = 1; $id <= 655; $id++) {
 echo "<br>$id .. ";
 $dns_record = $client->dns_a_get($session_id, $id);
 if($dns_record['type'] =='A'){
  $affected_rows = $client->dns_a_update($session_id, $client_id, $id, $dns_record);
  echo 'A';
 }
 echo " .. $id";
}
if($client->logout($session_id)) {
echo 'Logged out.<br />';
}

?>
__________________
Ispconfig 3 Latest Version (Stable)
Debian Squeeze (esix vm)
Reply With Quote
  #9  
Old 14th October 2013, 19:36
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Why dont you use the resync tool that is build into ispconfig? See Tools > Resync.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 14th October 2013, 20:06
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
 
Default

thanks,
that is what I need
__________________
Ispconfig 3 Latest Version (Stable)
Debian Squeeze (esix vm)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 13:58
Howto analyse a IPTables firewall issue? chillifire Installation/Configuration 2 27th August 2008 07:23
Problem on restart bind9 satimis Server Operation 6 30th October 2007 02:01
ISPConfig and BIND on Debian sarge (rfc1912 : failed on zonecheck) arnaud Installation/Configuration 13 6th March 2007 12:40
Bind-Chroot-Howto (Debian) spaz HOWTO-Related Questions 5 9th March 2006 14:50


All times are GMT +2. The time now is 14:48.


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