
19th August 2008, 10:01
|
|
Junior Member
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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
|

19th August 2008, 10:07
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,066
Thanks: 697
Thanked 4,248 Times in 3,260 Posts
|
|
Which database is empty? If you can see the users and sites in ISPConfig, the ispconfig database is defiantely not empty.
|

19th August 2008, 10:13
|
|
Junior Member
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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
|

19th August 2008, 10:16
|
|
Junior Member
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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
|
|

19th August 2008, 10:17
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,066
Thanks: 697
Thanked 4,248 Times in 3,260 Posts
|
|
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
|

19th August 2008, 10:25
|
|
Junior Member
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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
|

19th August 2008, 10:28
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,066
Thanks: 697
Thanked 4,248 Times in 3,260 Posts
|
|
Owner should be user: mysql and group: mysql
|
|
The Following User Says Thank You to till For This Useful Post:
|
|

19th August 2008, 10:34
|
|
Junior Member
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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
|

19th August 2008, 10:47
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,066
Thanks: 697
Thanked 4,248 Times in 3,260 Posts
|
|
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.
|

19th August 2008, 14:05
|
|
Member
|
|
Join Date: May 2008
Location: Germany
Posts: 65
Thanks: 9
Thanked 17 Times in 14 Posts
|
|
@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?
|
|
The Following User Says Thank You to Grey For This Useful Post:
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 07:25.
|
Recent comments
1 day 9 hours ago
1 day 11 hours ago
1 day 23 hours ago
2 days 2 hours ago
2 days 6 hours ago
2 days 12 hours ago
2 days 22 hours ago
2 days 23 hours ago
3 days 8 hours ago
3 days 9 hours ago