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
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.
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"
The status filed is not used, so the status does not matter. pending is just the default of the field in the database.
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 />'; } ?>