How do I fix the databse ?

Discussion in 'General' started by linickx, Nov 16, 2006.

  1. linickx

    linickx Member

    Hi All,

    Quick Question, something weird happened on my server, and the Vhosts entry for one website "disappeared". The /etc/passwd entry was still there, the virtuser stuff in postfix was still there, my dns wasn't effected, even the record for the site was in isp_isp_web !

    I've manually put the right stuff back into Vhosts, but I don't have the site appear in the tree in the gui, can someone confirm what records should exist in the db ?

    Many Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you deleted the site and its now in the recycle bin. Please open the recycle bin and click on restore.
     
  3. linickx

    linickx Member

    that's the weird thing, it's not in there !

    I've even tried re-creating it, but it complains that it already exists :(
     
  4. fobicodam

    fobicodam New Member

    Try this: check the isp_isp_web table, look for the site and clear the "state" field

    A backup will be recomendable...
     
  5. linickx

    linickx Member

    Hi fobicodam,

    I can't see "state" :( I've exported the 1st two rows of my table ....

    http://spreadsheets.google.com/ccc?key=p3l1qtlottAN3yop_D8usew


    (Sorry people if you don't have a google account, the table is quite big, and I couldn't think of a better way to share it... I can e-mail it if you like)

    ...linickx.co.uk did the dissapearing act, linickx.com works fines, any ideas ?
     
  6. fobicodam

    fobicodam New Member

    I dont remember how the field is called... look for some field with a rare value
     
  7. linickx

    linickx Member

    both rows are the same & still no joy :'(
     
  8. fobicodam

    fobicodam New Member

    The field is "status" on isp_isp_web. Ill bet it has 'U' set it to NULL.
     
  9. linickx

    linickx Member

    elo,

    cool, was being blind the 1st time, found status, but it is BLANK, like the others.

    Tried changing it to "NULL" but it only supports 3 char.
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Are you sure you checked all recycle bins? There's more than one (one for the admin, one for each reseller, etc.).

    Please don't modify your database directly as you will mess it up! :eek:
     
  11. linickx

    linickx Member

    Hi Falko,

    I'm certain, it's not in any recycle bin (all of them), just so you know the "weirdness" was my server hosting provider had QoS on the page file which was randomly killing processes, I'm fairly sure that something happened during my last save, and as such the DB is a little corrupt.

    I've gone through all the other settings, and this site is the only thing I can see that is missing, any idea's on how to fix it ?

    Cheers,
    Nick
     
  12. linickx

    linickx Member

    OK, so I've had a poke about a bit, & I can't make the same thing happen on my test box as my production one.

    DB entries in isp_isp_web, isp_isp_domain & isp_isp_user all exist the same as the other domains, except isp_nodes, but I'm not sure if there are other tables that need updating as well, or what to delete in order to be able to fully flatten my domain. ... I need to do something tho, since saving changes to any other customer/domain deletes the entries from Vhosts :(

    Since I've not moved any customers onto my box yet I could flatten the DB, but I'd have to pay to get the ISP to re-install the OS.

    Is there a way I could re-set the DB (& related /etc config files) as if it was a new install ?

    Suggestions please.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    What is in the field status of the isp_nodes table, where doc_id and doctype_is is the same then in the affected row of the table isp_isp_web?
     
  14. linickx

    linickx Member

    Hi Till, there isn't a row for that domain...

    Basically it was the 1st one I created id=1 doctype=1013 , id=2 & id=3 (the next two sites, owned by the same person, same group/parent etc) are in, and all records are the same, if tree_id is a mysql incremental number & not tracked anywhere in the app, then I might just add a row at the end & cross my fingers... thoughts ?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, this might work. Its worth a try.
     
  16. linickx

    linickx Member

    ok, so that puts it back in the tree, but there's no associated admin (which still exists) and the vhosts still isn't written correctly.

    Is there a "easy way" to re-set the db as if it was new ?

    If not I'm left with chase the dependency or deleting stuff until I can re-create it.

    cheers,
    Nick
     
  17. linickx

    linickx Member

    Yay... fixed it !

    Right, the entry in isp_nodes for my website had gone, so all the entries for the db users and e-mail pointed to the wrong parent in isp_dep ! I've just corrected isp_dep, now vhosts is created correctly, and the tree in the gui has all the right info, oh the joy ! :)

    (fingers crossed that's the end of it ;) )
     

Share This Page