Prev Previous Post   Next Post Next
  #1  
Old 8th January 2010, 22:40
Uvigii Uvigii is offline
Junior Member
 
Join Date: Aug 2006
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default DNS Replication

2 (or more) ISPC3. Updates on 1st are propagated to all MyDNS. Need testing and feedback.
I've change the following (on the slave server):
/etc/mydns.conf
Code:
soa-where = server_id = X
rr-where =  server_id = X
Code:
soa-where = server_id = 1
rr-where =  server_id = 1
/usr/local/ispconfig/server/server.php
Code:
 // Check if there is anything to update
        $tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id = 0)");
Code:
 // Check if there is anything to update
        $tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id=1 OR server_id = 0)");
/usr/local/ispconfig/server/lib/classes/modules.inc.php
Code:
//* If its a multiserver setup
                if($app->db->dbHost != $app->dbmaster->dbHost) {

                        $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]."  OR server_id = 0) ORDER BY datalog_id";
Code:
//* If its a multiserver setup
                if($app->db->dbHost != $app->dbmaster->dbHost) {

                        $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id = 1 OR server_id = 0) ORDER BY datalog_id";
about 30 lines below, near "$app->db->query($sql)"
Code:
$app->db->query($sql)
to
Code:
 if (($d['server_id'] == $conf["server_id"]) OR ($d['server_id'] == 0 ))
  {
    $app->db->query($sql);
   }  else {
     if (($d['dbtable'] == 'dns_rr')  OR ($d['dbtable'] == 'dns_soa') OR ($d['dbtable'] == 'dns_template'))
        {
           $app->db->query($sql);
         }
}
It is now possible to 'clone' config from master to that slave, also pick up updates for this slave (but will not serve them, unless you chose your server_id in mydns.conf). It is possible to break other modules configuration with the above, but I do not run other modules on that slave so I'm not digging deeper for now.

Last edited by Uvigii; 8th January 2010 at 22:47.
Reply With Quote
The Following User Says Thank You to Uvigii For This Useful Post:
falko (9th January 2010)
Sponsored Links
 

Bookmarks

Tags
dns, master, replication, slave

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
Squid Proxy Caching on Linux obzerver Installation/Configuration 4 13th August 2008 20:51
Google Apps dayjahone General 19 29th March 2008 18:25
DNS Configuration Problems VMartins Installation/Configuration 10 24th July 2007 15:40
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 15:34
No SPF record. beryl Installation/Configuration 6 17th May 2007 20:52


All times are GMT +2. The time now is 16:39.


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