I have a really weird problem. Somehow it seems ispconfig deleted all my website files. I have numerous websites located in /var/www/web*. After emptying the trash folders in the ispconfig admin backend and running "repair database" I found that all my websites were reduced to their default status with a single index.html file and an "error" folder. No trace of any files whatsoever Luckily I have backups of all sites, but I'm still confused - any ideas how I could troubleshoot this issue and find out what happened to all my files?
Take a look in /home/admispconfig/ispconfig/ispconfig.log. All actions that ISPConfig has taken are listed there.
Hi Till, do you have any news regarding this issue? I just executed ispconfig_update.sh and it deleted all my folders which were not defined in ispconfig database in /var/www. Why?
First, this thread is about ispconfig 2 and not 3, ispconfig 2 has no script with the name ispconfig_update.sh and ispconfig 2 and 3 have no code shared, so your issue can not be related to this thread. The ispconfig_update.sh script in ispconfig 3 does not contain any commands to delete files in /var/www, so there might be a timely coincience that files were deleted on your server, but this was not caused by the ispconfig 3 updater.
Hi Till, I followed these instructions: www. faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/ and yes there is ispconfig_update.sh file which deleted my directories in /var/www directory. I'm still trying to figure out how and why it delete directories which were NOT listed in ispconfig database. It seems that ispconfig deleted everything from /var/www/ which wasn't specified in database. However, the way how it deleted these directories is also very odd. I can't find them in list of deleted directories when using ext4magic or extundelete app. I have only semantic links to these folders from other folders, nothing else. Do you have any idea how and why ISPConfig deleted my directories?
The ISPConfig updater does not delete any files in /var/www, the updater does not even modify any files in /var/www. Take a look at the code if you don't believe me, there is no code that delete files in /var/www. Even the website config does not get changed or updated by the updater, the updater replaces only files in /usr/local/ispconfig (without deleting them first) and it modifies a few config files in /etc. Your problem is just a timely coincidence with the ISPConfig update and not caused by the ISPConfig updater.
Till, everything worked fine. I had websites running in /var/www for a long time without problems. Suddenly, I triggered ISPconfig update and these folders were filled with default content from ISPconfig default webpage: /usr/local/ispconfig/server/conf/index/ Therefore, I'm very sure that it is related to ISPConfig since otherwise my folders will not be replaced with these default content. Now I just can't figure why and how it replace them. Everything was removed somehow from these folders, but even apps for restoring of deleted content are not able to identify what happend. Any ideas?
I guess that it was the other way round, your files in /var/www where gone (e.g. due to a filesystem damage, which will explain also why you won't see them in undelete tools or you / another script / another program deleted them accidently somehow), ispconfig (but not the updater which never touches /var/www) tries to recreate a site when you edit this site in ispconfig (or all sites when you run Tools > Resync) when it cant fimd the site folders anymore. The result that you will get are the empty skeleton folders of the sites, so exactly what you see on your system now. So it is related to ISPConfig that the website folders are there again and that they contain only the default index.html page but it's not related to ISPConfig that the whole /var/www folder content vanished.
Till thanks for this info but can you please answer to one question: Even if ISPConfig wants to add default content to some folder in /var/www/SomeUserDirectory, what it will do with existing files? i.e. what will happen with index.html webpage which was located in that folder?
ISPConfig does not add any default content if the folder /var/www/SomeUserDirectory exists, only if there is no folder /var/www/SomeUserDirectory and if the exact folder name /var/www/domain.tld/web/ matches the name of the website that you added in ispconfig, then it will create that missing folder and then add its index.html page into the empty folder. So the folders in /var/www must had been gone e.g. due to a filesystem failure before ispconfig recreated them. Custom folders that don't have the name of a ispconfig website folder are never deleted, so you can have as many custom folders on your server as you want, ispconfig dont touch them.