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

    0
     
    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

    0
     
    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

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

    #!/bin/sh

    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 127.0.0.1

    But yes your right...

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

    ... is a lot easier.
     
  4. ideasmultiples

    ideasmultiples Basic Pleskian

    25
    73%
    Joined:
    May 19, 2004
    Messages:
    83
    Likes Received:
    0
    It's best to use plesk line utilities to add, delete or modify DNS data to avoid problems later.
     
Loading...