Article ID: 124158, created on Jan 7, 2015, last review on Jan 9, 2016

  • Applies to:
  • Operations Automation 6.0
  • Operations Automation 5.5
  • Operations Automation 5.4

Question

You have added a new nameserver to OA. It is automatically used for new domains that are added to OA. But for existing domains it is not. How to update existing POA domains to use this new nameserver?

Answer

Change DNS hosting for existing domains from Internal to External and then back from External to Internal:

  1. OA Provider CP Top > Services > Domains > customer1.com > DNS > Click Change DNS Hosting to External > Submit.

  2. OA Provider CP Top > Services > Domains > customer1.com > DNS > Click Change DNS Hosting to Internal > Choose correct DNS hosting assigned to the domain > Submit

Another way to do the same would be through the following API method pem.syncNameServers:

<?xml version="1.0"?>
<methodCall>
  <methodName>pem.syncNameServers</methodName>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>domain_name</name>
            <value>
              <string>DOMAIN_NAME</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

The following script will help to do that in automated way

NOTE: Replace FQDN with your OA database host name (OR) IP Address.

#!/bin/bash
# Script to Transfer Existing Zone files to Newly Deployed Name Servers

# Get the list of domains hosted in OA
psql -U plesk -d plesk  -h<FQDN> -c "SELECT name FROM domains" > domain.list

# Remove the Headers
H2=`head -2 domain.list`

# Filter Spaces and Unwanted strings
egrep -v "$H2|[0-9]*rows|^$" domain.list > domain_final.list

# Sync the zone files to newly deployed name servers.
for i in `cat domain_final.list`
do
    cp -av pem.syncNameServers.xml pem.syncNameServers_act.xml;
    sed -i 's/DOMAIN_NAME/'$i'/' pem.syncNameServers_act.xml;
    curl -d@pem.syncNameServers_act.xml http://localhost:8440/RPC2 >> /var/log/pem_syncNameServers.log 2>> /var/log/pem_syncNameServers_error.log;
    rm -vf pem.syncNameServers_act.xml;
    sleep 10;
done

Search Words

new DNS server

Change DNS Hosting

Changing DNS server

pem.syncNameServers

DNS settings are not reflected

ac82ce33439a9c1feec4ff4f2f638899 caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5356b422f65bdad1c3e9edca5d74a1ae 2554725ed606193dd9bbce21365bed4e 5b048d9bddf8048a00aba7e0bdadef37 956c448bddc7e1f3585373687602379f 6f1456866eed87488c0f02b298a741c0

Email subscription for changes to this article
Save as PDF