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

dns changes

Discussion in 'Plesk for Linux - 8.x and Older' started by dgiff, May 6, 2008.

  1. dgiff

    dgiff Guest

    I was wondering if I make changes directly to the dns files how do I get those changes to update in psa as well? Do I have to add them manually to the db too?
  2. meto

    meto Guest

    You can add them manually but if Plesk doesn't recognise them it will delete them when you'll try to edit via Plesk. If you see in Plesk records edited by you it wont delete them. IMO better way is to add them with command line: list of commands /usr/local/psa/bin/dns.sh --help
  3. dgiff

    dgiff Guest

    I have come up w/ this solution to add A records into the db...


    mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e"INSERT INTO `psa`.`dns_recs` (`dns_zone_id`,`type`,`displayHost`,`host`,`displayVal`,`val`) VALUES((SELECT `id` FROM `dns_zone` WHERE `name` LIKE '$1'),'A','$2.$1','$2.$1','$3','$3');"

    exit 0

    Which is run like...

    ./mydns.sh example.com subname

    But yes your right...

    /usr/local/psa/bin/dns -a example.com -a subname -ip

    ... is a lot easier.
  4. ideasmultiples

    ideasmultiples Basic Pleskian

    May 19, 2004
    Likes Received:
    It's best to use plesk line utilities to add, delete or modify DNS data to avoid problems later.