Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th May 2008, 00:52
ehsan ehsan is offline
Junior Member
 
Join Date: Sep 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default ISPConfig update reset the whole database

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.

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

Ehsan
Reply With Quote
Sponsored Links
  #2  
Old 25th May 2008, 17:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,744
Thanks: 840
Thanked 5,598 Times in 4,409 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th May 2008, 17:23
ehsan ehsan is offline
Junior Member
 
Join Date: Sep 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
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.
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.

Quote:
Please have a look in the /tmp directory if there are any .tar.gz and .sql backup files. ISPConfig creates them automatically during update.
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
Reply With Quote
  #4  
Old 25th May 2008, 17:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,744
Thanks: 840
Thanked 5,598 Times in 4,409 Posts
Default

Quote:
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.
The /root/ispconfig directory had to be recreated before you run the setup again.

Quote:
Should I expect to find anything in the tar archives?
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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 25th May 2008, 17:47
ehsan ehsan is offline
Junior Member
 
Join Date: Sep 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
The /root/ispconfig directory had to be recreated before you run the setup again.
The installer did not prompt me to do so...

Quote:
No, at least not the missing database content.
Oh, that's not good.

Quote:
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.
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?
Reply With Quote
  #6  
Old 27th May 2008, 08:00
tchiboo tchiboo is offline
Junior Member
 
Join Date: Sep 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #7  
Old 27th May 2008, 09:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,744
Thanks: 840
Thanked 5,598 Times in 4,409 Posts
Default

Quote:
Why does it happen ?
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
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 27th May 2008, 09:31
tal56 tal56 is offline
Member
 
Join Date: Oct 2007
Posts: 91
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ispconfig update problems from 2.4 to 2.6 adrenalinic Installation/Configuration 23 7th September 2006 13:58
After ISPConfig update no longer changes through the webinterface possible Pasco Installation/Configuration 25 8th August 2006 19:19
ispconfig mysql database: what differences?!? gilas Installation/Configuration 3 21st July 2006 14:29
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 16:16
Recreating ISPConfig database retran Installation/Configuration 2 16th April 2006 00:22


All times are GMT +2. The time now is 11:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.