I just emptied the ISP Manger Recyle Bin and my /var/www directory got removed completely. Because I didn't believe it at first, I restored a backup and tried it again with the same result. Dear Falko and Till, how on earth can this happen?
If you set the document root of a website to /var/www instead of a subdirectory and you delete thsi website. If I remeber correctyl, you had some problems with your ISPConfig database before?
In the recycle bin are no deleted websites. It contains two items: a deleted folder and a deleted user. Yes, I'm the one who was having problems before. Unfortunately you were not able to help me solve those problems, so I hoped it was just a coincidence. Apparently it wasn't. Without any documentation of the database, it's impossible for me to find and solve the problem.
There are several explanations on the database schema in the forum. just search for "database schema". http://www.howtoforge.com/forums/showthread.php?t=7575&highlight=database+schema
I have looked at some of those threads, but the questions there are quite specific. Trying to find an integrity problem in a database with 52 tables of an application I didn't develop myself and don't know anything about and without a database schema, is a huge task. I'm a software developer for more than 25 years, but such a task would take me at least several days (I'm being optimistic here) and I just can't afford that. It's already taking me quite a a lot of time and euro's to try to get my server with ISPConfig up and running, but I'm starting to think it's just not going to happen. Such is life I guess.
The best and fastest solution is just to backup the data, uninstall ISPConfig and then reinstall it. Checking the relations in the database manually will take me several hours too and there is no guarantee that the problem can be found in a reasonable time.
I guess you are right. It's a lot of work though. Could you verify the steps I think have to be taken: Document all my ISPConfig entries (clients, resellers, websites, users, dns entries etc.). Backup /var/www. Backup any website databases. Uninstall & reinstall ISPConfig. Recreate all ISPConfig entries. Restore any website databases. Restore /var/www. Is that it? Am I not forgetting something crucial?
The steps look fine. I recommend to make a backup of /etc too. All passwords of the users are stored in /etc/shadow and you might copy them back to this file after you recreated the users. Also backup all databases and not just the wbsite databases as the mysql login data for the websites database is stored in the "mysql" database. ISPConfig has a protection of existing users and all your current linux users will be protected after you reinstalled ISPConfig. To be able to recreate users with the same usernames, remove the usernames from the file /home/admispconfig/ispconfig/users If you used the squirrelmail webmail program, backup the directory /home/admispconfig/ispconfig/temp/webmail too, it contains the downloaded and sent emails from squirrelmail.
Thanks for the feedback. So if I understand you correctly: I don't have to bother entering the original passwords for the users, because I can restore them by restoring /etc/shadow. I must backup & restore all databases except db_ispconfig. After re-installing ISPConfig, I have to remove all ISPConfig users from /home/admispconfig/ispconfig/users. I don't use squirrelmail (but Roundcube) so that's not an issue. I'm a bit confused though. The first point leads me to believe that uninstalling ISPConfig also removes the ISPConfig related Linux user accounts. On the other hand, point three makes me think exactly the oposite. So my question is: does an uninstal of ISPConfig also remove the ISPConfig related Linux user accounts? If it doesn't, isn't there a conflict when I create users in ISPConfig that already have a Linux user account (assuming that I remove them from /home/admispconfig/ispconfig/users first)? I'm sorry to take up so much of your time, but I don't want to make any stupid mistakes this time. I'll make an extra donation as soon as my problems are solved
no. please see my post above: ISPConfig has a protection of existing users and all your current linux users will be protected after you reinstalled ISPConfig. To be able to recreate users with the same usernames, remove the usernames from the file /home/admispconfig/ispconfig/users
Thanks for the confirmation. By the way, is it possible to somehow keep the id's (webXX) of my old sites? My current id's are not consecutive. Does ISPConfig keep track of the last id in a specific table field, so I can increase it manually, whenever I want to skip a few numbers to create a site with a specific id? It would make restoration of all the data so much easier.
I guess I found the answer. Often a matter of using the right search criteria Thread Starting with id other than "web1"? addresses this issue and suggests that "alter table isp_isp_web auto_increment=32" does the trick. Is that completely safe and can it be done multiple times, so not only to start on a different number but also to skip a few numbers along the way?
Thanks for the tip. I tried it and it works like a charm. I was able te recreate all websites with the same id's as before.