1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Force Plesk to re-write all DNS zone files

Discussion in 'Plesk for Linux - 8.x and Older' started by perfectpenguin, Dec 11, 2005.

  1. perfectpenguin

    perfectpenguin Guest

    0
     
    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
     
  2. jlschwab

    jlschwab Guest

    0
     
    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! ;)
     
  3. perfectpenguin

    perfectpenguin Guest

    0
     
    Great stuff, thanks Jason. Just what I needed!

    Best Regards,

    Simon
     
  4. Cranky

    Cranky Guest

    0
     
    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?
     
  5. perfectpenguin

    perfectpenguin Guest

    0
     
    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
     
Loading...