*** This would probably work between any 2 named name servers. All you'd need to change are the paths. ***
It can be done. I did it some time ago, on Plesk 5. I had a main Plesk server to which I added the domains, and a backup Plesk server which fetched the domain list from server 1 and put them in server 2, completely outside of plesk.
I just added an 'include' directive in Server 2's named.conf, and then with some scripting, some cron jobs and with the help of wget, everything gets transfered regularly.
You need to create a protected directory on a website on server 1 (password protected), and extract a list of domains from the named.conf on this server (cat /var/.../named.conf | grep ...), write it to a file (slaves.txt). This can be done as often as you like.
On server 2, set up a cron job to fetch that file (wget http://user:[email protected]/folder/slaves.txt), and create a script to process it and create the file that you included higher. Then restart named on server 2, and it will check every domain's serial number. If it's been updated or inexistant, it will fetch the records.
Here's the stuff... I didn't know about the cut command at the time, so the content of slaves.txt is really
but that's adjusted in the php file (which I didn't do. It can still be found in the programming forum).
foreach($cnt as $line)
if ($_SERVER['argc'] < 2) printf("Usage: %s <file>\n",$_SERVER['argv']);
Script 1 can be run every hour or half or whatever. It will keep an up to date domain list on your first server.
Before running script 2, erase the included file (say named2.conf) via a cron job. Immediately after, run
php -q script2.php slaves.txt > named2.conf
adding and replacing file names and paths as needed. Change the permissions, the owners, and restart named. That's it.
You still have to update a plesk table on server 1 so it allows zone transfers from server 2 before it works.
I was hoping for some more easy option.
Plesk says something about the 'DNS_Allow_Transfer1' parameter (see http : // download1.sw-soft.com/Plesk/Plesk7/Doc/pdf/plesk-7-advanced-features.pdf for more information.
(this has to be set up at the master DNS server ofcourse)
Now I wonder if there isnt something like a DNS_Get_ZoneFile_From_Server setting for the backup-DNS-server?
I can't beleive that SWSoft didnt think of such an automated option.
The complexity comes from your need to have every zone file created automatically. Plesk won't know what zones to create unless you create the domains on Server 2. If you don't, then you have to tell named what to do, and that's what the scripts do.