• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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
 
Back
Top