• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question How do I directly change the DNS entries under Plesk?

Raba

New Pleskian
Hello,

the following scenario:
Plesk manages the domain "example.com" and its primary name server. The zone file has about 6000 entries.

Now I want to remove a larger number of records. If I use a command according to the pattern

plesk bin dns -d example.com -mx snakeoil -mailexchanger mailin.example.com

it takes five minutes (!!!) for each record. Also, the serial number is incremented after each change, so I would never get more than 99 changes in one day.

As I have already found out, the zone file is located at

/var/named/run-root/var

Now I thought that I could also make the changes directly in the zone file. But maybe you still need to synchronize with the database managed by Plesk?

Quick question: How do I get everything right in Plesk if I write directly to the zone file?

Thanks
Ralph
 
6000 entries
:oops:

What kind of work you're involved in, anyhow you can try applying the default DNS template and you need considerable resources to perform this request.

Or you can use direct CLI:

Bash:
plesk bin dns -res example.com -ip <DOMAIN_IP>

t takes five minutes (!!!) for each record.
Mine took 1second for 1 record in 512MB RAM and 1CPU. you need to check and watch the server resources.

But maybe you still need to synchronize with the database managed by Plesk?
Yes

How do I get everything right in Plesk if I write directly to the zone file?
Avoid direct file edit. they need to match the DB entries.
 
Hello Hextrator,

I don't understand how I can use the template here. Can you write me more about it?

I've thought of something else. Some years ago I copied the zone file from another server (without Plesk) to Plesk. The file already had several thousand entries back then. I certainly did not make every single entry manually. It worked back then, but I don't remember how I proceeded.

So now I would like to ask a different question: how do I get a complete zone file loaded into Plesk?
 
I don't understand how I can use the template here. Can you write me more about it?

I think you know, you have a lot of work to do, Plesk DNS template trick is to save you time by adding a general record to match the domain properties (IP,Domain,etc). but in your case, the following should help you with the power of a shell script:




It worked back then, but I don't remember how I proceeded.
If I were you, such an accomplishment should be added and remembered in my technical accomplishments history. 6000rd/domain.


XML:
<packet>
<dns>
  <add_rec>
      <site-id>1</site-id>
      <type>NS</type>
      <host>Mysite.com</host>
      <value>ns.Mysite.com</value>
    </add_rec>
   <add_rec>
      <type>A</type>
      <host>example.com</host>
      <value>192.0.2.0</value>
   </add_rec>
</dns>
</packet>

 
Thank you very much for the hint.

Unfortunately, I am not so well versed in these somewhat complicated procedures.

Therefore I have come up with a different way first. I wanted to make changes in the zone file to change the database.

But there is a command:

plesk repair dns

I have slightly modified the zone file /var/named/run-root/var/domain.com and then

plesk repair dns

is entered.

No response. What I mean is, there was no error message. But by my modification of the zone file there should have been a discrepancy with the entries in the database. What do I do?

Best regards,
Ralph
 
Late reply to this but in case it helps others:

When moving servers I just update the plesk dns_recs table records directly with SQL to a 180 second TTLs a few days out, migrate all the sites, and then have an hour outage window where I re-sync all the sites and map all the new IP addresses over

Any change to dns_recs you run this and it'll update the zone files

[root@~]# plesk repair dns

Checking the DNS configuration file ................................. [OK]
Checking the user DNS configuration file
Restore the user DNS configuration file from the template? [Y/n] n

Restoring DNS server configuration
Synchronize DNS zones with the DNS server? [Y/n] y
Synchronizing DNS zones with the DNS server ..................... [OK]
 
Back
Top