Table web_domain reconstruction...

Discussion in 'General' started by exdiogene, Mar 18, 2014.

  1. exdiogene

    exdiogene New Member


    I had a crashed file on my server hard disk and lost the content of my web_domain table.

    Unfortunately I had automated backups for each sites but not for the main DataBase. :(

    I am trying to reconstruct that table with phpmyadmin and to find the related informations everywhere.

    If someone could give me some tips about where the data can be found for each needed fields I would greatly appreciate it.

    For now I was able to recover system_user and system_group in my directory structure for my 6 domains, I was also able to find the hd_quota and traffic_quota in the clients section.

    Thank you in advance for your help.

  2. exdiogene

    exdiogene New Member

    Over 144 views and no reply...

    If I could only have sample values or more informations for those 6 fields, it would greatly help me :
    sys_userid(Is it the uid used elsewere?)
    sys_groupid(Is it the gid used elsewere?)
    ip_address(Is it "*" or the full IP string?)
    document_root(Can it be left to NULL?)
    web_folder(Can it be left to NULL?)
    stats_password(Can it be left to NULL?)

    Thank you in advance for your time,

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    sys_userid: id of the login user from sys_user table
    sys_groupid: default group id of the login user from sys_user table
    ip_address: Can be * or the full IP
    document_root: Can not be null. Is somethinf like /var/www/clients/client5/web3
    web_folder: has to be NULL for websites (type vhost)
    stats_password: yes
  4. exdiogene

    exdiogene New Member

    Thank you Till Brehm for your help!

    I will begin the table reconstruction right away.

    So the document_root will be recreated from the system_group and system_user fields values like this :

    Is the stats_password content "yes" and the password is stored in another table, or must I enter a password there? If I must enter a password, must it be encrypted and how?

    Thank you again for your precious help.
    Last edited: Mar 19, 2014
  5. till

    till Super Moderator Staff Member ISPConfig Developer


    you will have to enter new stats passwords in ispconfig, after you reconstructed the table.
  6. exdiogene

    exdiogene New Member

    Thank you again for the details.

    Everything is fine except one field content :
    With those fields :
    sys_userid : 3
    sys_groupid : 3
    document_root : /var/www/clients/client2/web2
    system_user : web2
    system_group : client2

    When I verify the content in ISPCONFIG3, I get that field filled with bad references :
    php_open_basedir :

    As you can see, the error is "/var/www/clients/client2/web1" where "web1" is suppose to be "web2".

    From what I can understand with different rows, it is always "1" less than the real value. ISPCONFIG3 is always filling this information by itself incorrectly...

    Is this a bug?
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Then the domain_id is wrong. The web user is formed of the word "web" üöus the domain id of the website.
  8. exdiogene

    exdiogene New Member

    Thank you for this detail, I was believing that the domain_id was only used for identifying a specific row and I started them with "1" and increasing each row as the automatic_counter would do.

    So If the domain_id is 4 then the system_user will be web4 and the document_root will use that accordingly.

    Now I only have to correct the other rows.

    Thank you for your help.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    domain_id is an automatic counter and on this counter, everything that belongs to the website is build, from ssh users to ftp users to the website directory. So when you reconstruct your websites, you have to reconstruct the correct order as well. use the web[ID] users of the website folders to get the order right.
  10. exdiogene

    exdiogene New Member

    It have been done that way and I hope that everything would be working correctly afterwards.

    Thank you very much Till for your help, you are giving good support here.


Share This Page