ISPConfig update reset the whole database

Discussion in 'General' started by ehsan, May 24, 2008.

  1. ehsan

    ehsan New Member

    I had a server running ISPConfig 2.2.17, and I decided to update it to 2.2.23 today. My MySQL root password contained an ampersand at the beginning, which caused the update to fail. Apparently the password was passed to the mysql utility on the command line, and the & at the beginning of the password just confused the installer.

    I tried changing the MySQL root password temporarily and updated /home/admispconfig/ispconfig/lib/config.inc.php, and re-ran the installer.

    This time the installer went ahead just fine, and I tried logging in to ISPConfig after it finished, and I observed that my admin login no longer works. :( I then tried "admin" as the password, and it worked. I suspected that something is fishy and looked around, and apparently, all of the ISPConfig database has been reset to the fresh state by the installer! It looks like a brand new ISPConfig installation...

    This is very bad, because I won't be able to use ISPConfig to manage anything from now on, and I have to do everything manually in the config files... And stupid me, I don't have a backup from this DB on this server which I can resort to.

    Is there any chance of getting the data back? All of the config files that ISPConfig had written are still in place. This server hosted only four web sites, so I still have a lot of the details in memory. :confused:

    Thanks for your help, I'm desperately in need of some...

    Ehsan
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess that you run the ispconfig installer twice without creating the directory /root/ispconfig again. During the second run, the installer was not able to detect your installation anymore and installed a new empty ispconfig version.

    Please have a look in the /tmp directory if there are any .tar.gz and .sql backup files. ISPConfig creates them automatically during update.
     
  3. ehsan

    ehsan New Member

    The second time I ran the installer, the /root/install_ispconfig folder was deleted completely (when the previous instance of the installer quit). I extracted the /root/install_ispconfig again and then re-ran setup. I didn't touch /root/ispconfig or /home/admispconfig at all.

    Hmmm, here's the listing of /tmp (the relevant entries):

    Code:
    ehsan@server7:/tmp$ ls -l
    total 217060
    -rw------- 1 root         root                0 2008-05-24 13:06 existing_db_05_24_2008__13_06_06.sql
    -rw------- 1 root         root                0 2008-05-24 15:20 existing_db_05_24_2008__15_20_46.sql
    -rw------- 1 root         root             1234 2008-05-24 15:59 existing_db_05_24_2008__15_59_18.sql
    -rw------- 1 root         root         44851719 2008-05-24 12:50 home_admispconfig_05_24_2008__13_06_06.tar.gz
    -rw------- 1 root         root         61646123 2008-05-24 14:53 home_admispconfig_05_24_2008__15_20_46.tar.gz
    -rw------- 1 root         root         61646502 2008-05-24 15:31 home_admispconfig_05_24_2008__15_59_18.tar.gz
    -rw------- 1 root         root         18033126 2008-05-24 12:50 root_ispconfig_05_24_2008__13_06_06.tar.gz
    -rw------- 1 root         root         17741565 2008-05-24 14:52 root_ispconfig_05_24_2008__15_20_46.tar.gz
    -rw------- 1 root         root         17742556 2008-05-24 15:30 root_ispconfig_05_24_2008__15_59_18.tar.gz
    Here is the contents of existing_db_05_24_2008__15_59_18.sql:

    Code:
    ehsan@server7:/tmp$ sudo cat existing_db_05_24_2008__15_59_18.sql
    -- MySQL dump 10.11
    --
    -- Host: localhost    Database: ispconfigdb
    -- ------------------------------------------------------
    -- Server version       5.0.38-Ubuntu_0ubuntu1.4
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
    
    /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
    /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
    /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
    
    -- Dump completed on 2008-05-24 20:59:18
    I doubt that's any help. :(

    Should I expect to find anything in the tar archives?

    Ehsan
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The /root/ispconfig directory had to be recreated before you run the setup again.

    No, at least not the missing database content.

    Please have a look in /var/lib/mysql/

    maybe there is still the ispconfig database under its old name with its old content as ISPConfig v´can not be installed into an exiting database, the data might still be there.
     
  5. ehsan

    ehsan New Member

    The installer did not prompt me to do so... :(

    Oh, that's not good.

    No, unfortunately the only database residing in that direcory is the ISPConfig DB (ispconfigdb), which contains the files needed for the new DB. It seems like the existing database was wiped out before the new one was installed. Is there any hope left?
     
  6. tchiboo

    tchiboo New Member

    The same

    Hi,

    I had the same problem yesterday.

    I had to restore from backups.

    Why does it happen ? I would like to upgrade my 2.2.18 version.

    Many thanks
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact error message that you got as you run the setup the first time.

    secondly, make sure that you never run the setup script again if it failed before you had run:

    mkdir /root/ispconfig
     
  8. tal56

    tal56 Member

    I wish I could help here too, however I just wanted to say that it happened to me also on a test server that was upgrading from 2.2.18, half way through what looked like the compiling part it just stopped and got stuck there, I left it for half hour just to see if it would continue. Then I had to reset the computer and ran into the same problem, didn't know I had to recreate that folder in order to run the update again.

    Not sure what happened. Unfortunately I've reformatted that computer so can't get any logs or details. Just wanted to let you know it's happened to me as well. My OS is Centos 5, in which I updated to 5.1 just before doing the upgrade to 2.2.23. I thought it was a issolated issue so never mentioned.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem was that you interrupted the update. The update has removed the /root/ispconfig flder and without this folder, the setup script performed a new installation instead of a update as you run it again.
     

Share This Page