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 19th August 2008, 10:01
corona corona is offline
Junior Member
 
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default Wiped Database Recovery??

Hello,
I'm managing an ISPconfig system. A couple of hours ago I made a chown mistake on the /var/www folder. I found this post to fix it:
http://www.howtoforge.com/forums/sho...ht=permissions

I ran the mysql statements, added a user to a website, then deleted the user, and checked the file permissions, didn't seem completely fixed. Checked the database and it's now completely empty. no tables. no nothing.

All services seem to be running still, and I can navigate around ispconfig and everything is still there, all the websites, all the users. Has anyone got any ideas what's going on, and how to recover from this?

Andrew
Reply With Quote
Sponsored Links
  #2  
Old 19th August 2008, 10:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,386 Times in 4,231 Posts
Default

Which database is empty? If you can see the users and sites in ISPConfig, the ispconfig database is defiantely not empty.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 19th August 2008, 10:13
corona corona is offline
Junior Member
 
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default

well, ispconfigdb databse is empty, and I tried a backup from the management menu of ispconfig, and the downloaded file is basically empty:

-- MySQL dump 10.11
--
-- Host: localhost Database: ispconfigdb
-- ------------------------------------------------------
-- Server version 5.0.38-Ubuntu_0ubuntu1-log

/*!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-08-19 7:46:55


It's got me freaked out. Is there any way to verify where ispconfig is looking for it's data?

Thanks,
Andrew
Reply With Quote
  #4  
Old 19th August 2008, 10:16
corona corona is offline
Junior Member
 
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default

also, the "check database" and "repair database" functions in management aren't working, seemingly because it's not finding tables to run them on:

Quote:
Warning: mysql_list_tables() [function.mysql-list-tables]: Unable to save MySQL query result in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 315

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 316

Warning: Invalid argument supplied for foreach() in /home/admispconfig/ispconfig/web/admin/datenbank/check.php on line 45
Reply With Quote
  #5  
Old 19th August 2008, 10:17
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,386 Times in 4,231 Posts
Default

The database login details are in /home/admispconfig/ispconfig/lib/config.inc.php

If the websites are visible in ISPConfig, then they are dfinately there. maybe you changed the permissions in /var/lib/mysql too and not just in /var/www
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 19th August 2008, 10:25
corona corona is offline
Junior Member
 
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default

actually I think the problem will be the permissions on the mysql database files will have been walked on too. Found them in /var/lib/mysql, do you know whether the owner of the files should be the same as the group (some mysql, some root)? Only the owner got accidentally modified, so group is the same as it should be.

Thanks for your help,
Andrew
Reply With Quote
  #7  
Old 19th August 2008, 10:28
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,386 Times in 4,231 Posts
Default

Owner should be user: mysql and group: mysql
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
corona (20th August 2008)
  #8  
Old 19th August 2008, 10:34
corona corona is offline
Junior Member
 
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default

oh, thank you so very much for your assistance, once I fixed the owner all the tables jumped back into existence in phpmyadmin. Now to do a full backup!!!

Do you know of any add-ons or something for ispconfig that do nightly backups? I'm really wishing we had something in place to do that now.

Thanks again,
Andrew
Reply With Quote
  #9  
Old 19th August 2008, 10:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,386 Times in 4,231 Posts
Default

Quote:
Do you know of any add-ons or something for ispconfig that do nightly backups? I'm really wishing we had something in place to do that now.
There are no addons for ISPConfig, yiu may use any linux backup program for your ispconfig server. You will find several howtos here om howtoforge if you search for backup.

Personally I prefer the "old" way, just a shell script that extracts the databases with mysqldump or mysqlhotcopy and then tar to store them as archive. Also make a tar backup of the document root (/var/www) and the /etc/ directory.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 19th August 2008, 14:05
Grey Grey is offline
Member
 
Join Date: May 2008
Location: Germany
Posts: 70
Thanks: 9
Thanked 18 Times in 15 Posts
 
Default

@corona: What distro is your installation running on?
On our etch double-db-server at work, we are running zmanda OpenSource MySQL backup. (http://www.zmanda.com/backup-mysql.html)
But that's only if you're talking about mysql database backup. Or do you want to fully backup your server at night?
Reply With Quote
The Following User Says Thank You to Grey For This Useful Post:
corona (20th August 2008)
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
MySQL problem satimis Server Operation 5 25th June 2008 15:41
Database missing after upgrade autonic General 1 7th March 2008 15:33
Mail System doesnt work! crichton Installation/Configuration 3 17th September 2007 23:49
Unknown database 'db_ispconfig' ? Got Wiped out? webking General 2 21st July 2007 20:21
Recreating ISPConfig database retran Installation/Configuration 2 15th April 2006 23:22


All times are GMT +2. The time now is 04:24.


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