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

Explanation of the fields in IP-related db tables

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by Hostasaurus.Com, Dec 27, 2012.

  1. Hostasaurus.Com

    Hostasaurus.Com Regular Pleskian

    Oct 8, 2009
    Likes Received:
    Can someone post an explanation of what the fields in the four IP-related tables in the psa database do?

    Those would be:

    I'm trying to write a script that will go out and retrieve the default site for every exclusive IP on hundreds of servers so we can automate reverse DNS entry updating on a central location.

    I'll give an example of some of the weird things I'm seeing. Site A is on an ipv6 and ipv4 address. In IP_Addresses, id 'appears' to be unique, however 'id' numbers get skipped and it's not set to be unique in the db so no way to know if it really is. This site's two IP addresses have id's 281 for the ipv6 and 2 for the ipv4 in IP_Addresses.

    For some unknown reason, even though the ipv4 address was defined as an exclusive IP when added to the server, once it was assigned to a reseller, it displays as "shared" at the reseller level. It still shows as exclusive at the server level.

    In the ip_pool table, the IPv4 address has three entries; id numbers 1,4,21, ip_address_id is set to 2 on all three entries, one of the entries is set to exclusive, the other two shared. The site is set to be default on both its ipv4 and ipv6 address.

    In the ip_pool table, the IPv6 address has three entries, 1,4,21, ip_address_id set to 2, all three set to exclusive. This address shows as exclusive at both the server level and reseller level for some reason.

    I have no idea what the three id numbers represent, nor how they relate to the IPAddressesCollections and IPCollections tables.

    This has left me with the thought that perhaps I should just go through only the IP_Addresses table and extract the domain name from the domains table where the default_domain_id is not set to zero. In theory, that should get me only exclusive sites (since the shared ip's don't have default sites), and in that case I can set up a PTR record. I'd like to make sure I understand what is really in the database though in case this is a flawed assumption.