• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Force Plesk to re-write all DNS zone files

P

perfectpenguin

Guest
Hi,
Let's say some or all of a severs DNS zone files had accidentally become screwed but all the information in plesk (and therefore the plesk database) was still correct. Does anyone know of a command to issue that would force plesk to rewrite the zone files?

Thanks,

Simon
 
You simply need to run:

Code:
# /usr/local/psa/admin/bin/dnsmng update domain.tld

You will need to run that for every domain involved.

You can do it for all your domains, by trying this nifty little shortcut:

(This shortcut is listed on the SW Soft Knowledge Base As well)

Code:
# mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh

KB URL: http://faq.swsoft.com/article_20_154_en.html

If this does not solve your problems, please feel free to contact me here or directly at any time, I'll be glad to help you!

Hope this helps! ;)
 
Great stuff, thanks Jason. Just what I needed!

Best Regards,

Simon
 
Out of interest, which Plesk build did you have this problem with? Or was it caused by human error or something else rather than Plesk?
 
No, to be fair this isn't a plesk generated problem. I use 4PSA Total Domains which is an excellent package for taking all the work out of hosting 'alias' domains (i.e. all mail and web for company.co.uk > plesk domain company.com) without consuming plesk licences. However, for some clients I need to pipe mail out direct to their own mail servers which nowmally just requires a DNS zone file change and a manual alteration to a QMail file that plesk never touches. This level of overriding is not possible for a domain managed via TotalDomains so I'm going to write a PHP script that will let me add DNS zones and data directly into the Plesk database. This way I won't need to worry about plesk ever automatically overwriting non-plesk zone files that I may have created but I did need a way of making it write out the files in the first place, after having entered the information into the database - hence my question.

Of course, if after reading this long and convoluted explanation (why use ten words when 100 will do the job!!), you can see a better way of acheiving my goal, I'm all ears.....

All the best,

Simon
 
Back
Top