• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PLESK 11 ... some thoughts.

lvalics

Silver Pleskian
Plesk Guru
I write down my problem and how I solved it and what I suggest to developers for the future.

2 days ago I had a terrible HDD crash. OK, I said, it was a PLESk 11.0.x version, I have backups, so I will restore a new system, install PLESK 11.0.9 (latest) and I will restore directories, etc from backup.

I do backup to
/database in SQL format
/var/www/vhosts/
/etc/

in the future I will add as well
/usr/local/psa/
/var/named/

Seems if was OK for PLESK 9 and 10, not enough for PLESK 11.

After I installed new OS and PLESK, I have restored first 2 databases.
1. psa - to have all info from old DB (domains etc)
2. mysql - to have passwords and same data like on old server.

Then I have restored all data for /var/www/vhosts/ - took me a while, it was 250GB :-(( almost a day.

I have tried to see what needed to restore from /etc/ and I have done restore for /etc/shadow , /etc/passwd , /etc/group files.

Of course on a restart of PLESK and apache, apache did not started, so I tried.

/usr/local/psa/admin/bin/httpdmng --reconfigure-server to get all OK
then
/usr/local/psa/admin/bin/httpdmng --reconfigure-all

Here I got an issue, what I suggest for developers to fix. Because my backup was 2 days ago, meantime some people created domains/subdomains. This means in my backup that folders did not existed. On reconfigure-all I got errors that folder /var/www/vhosts/domain.com/conf dir not exist. yes did not existed /var/www/vhosts/domain.com so cannot be created nothing in /var/www/vhosts/domain.com/conf/

It was not hard to create with mkdir -p /var/www/vhosts/domain.com/conf and restart the reconfigure, but because of 300 domains, always take a while. Seems reconfigure get in batch files X number of domains and do it then next domains. This is OK, but always start from scratch. What I suggest to developers to create this dir automatically with mkdir -p and then can go forward.

Also there is --reconfigure-batch <batch-source> command, but no documentation found on how to use that batch file. cause then I should create batch files in 20-30 domains and check it like that and not so time consuming.
I have tried to add the array but not work, again, no DOC on how to create that file. :-((

OK, after I have redone this, all seems OK.
Also I have tried to redo the named.conf, nothing to find to restore automaticaly, dunno if reconfigure-all create it or not. If someone knows a command to restore all zones, let me know please.

After this I restored also mails with /usr/local/psa/admin/sbin/mchk, this also take a while, but all emails was restored fine.

So far we have now emails, websites.

I create a backup with automysqlbackup for all database daily. All DB was in separate folder (dbnamefolder) and inside the SQL. So it was easy to write a small shell file and copy all folders in /var/lib/mysql and then run all SQL files with a batch file. BINGO now we have DB as well.

Because all was done, I have tried to get into PLESK. I think something was wrong on DB or something, cause not started and then I applied a bootstrap. WRONG :-( This crashed all my PLESK. Now I have - 500 - Internal Server Error

So what have tried, to see how can I install PLESk server again, looked for RPM files, like it was in PLESK 9 or 10 in /root/PARALLELS folder. The problem that PLESK 11 have only INF files here and MU files, no RPM. So I cannot force a reinstall to fix issues. usually in PLESK 9 when nothing worked, a forced RPM install fixed issues.
If anyone know how can I grab from Parallels site the RPM, to force a PSA reinstall, base at least ...
As for developers, dunno what was the reason to not offer this RPM files, but at least you should have a way to get RPM in some cases (with some tools) and resolve some problems offline.

Hope this problems and solutions will help to some people and not waste time like I have done 2 days :-(

LATER EDIT: Seems that the problem with PLESK start is that /etc/psa/private/secret_key is wrong and this is why PLESK does not start. I wondering why I cannot just regenerate with a tool. I try now to boostrap repair and hope will help.

LATER EDIT 2: Seems that boostraper does not regenerate the secret key even if I delete it. Not also autoinstaller :-(

LATER EDIT 3: http://forum.parallels.com/showthread.php?t=98498
Edit:
Before:
"max-procs" => 1,
"min-procs" => 0,

After:

"max-procs" => 1,
"min-procs" => 1,

Restart CP and work.

LATER EDIT 3:
for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/domain --update-php-settings $i -settings 1.txt; done

for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/domain --update-php-settings $i -additional-settings 2.txt; done

1.txt
session.save_path=/tmp
error_reporting=E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE _ERROR

2.txt
date.timezone = "Europe/Berlin"
 
Last edited:
Thank you for sharing your story. It is really valuable for us.
And you can always find necessary rpms and debs here
 
Last edited:
I have one last question regarding this post.
How can I MASS update PHP settings for each domain with following.

Apache CGI, PHP settings, session.save_path = /tmp , error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR, custom command = date.timezone = "Europe/Berlin"
 
I have one last question regarding this post.
How can I MASS update PHP settings for each domain with following.

Apache CGI, PHP settings, session.save_path = /tmp , error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR, custom command = date.timezone = "Europe/Berlin"

I wrote file php.txt with following content (not sure that is is absolutely correct):

# cat php.txt
session.save_path = /tmp
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
date.timezone = "Europe/Berlin"

Then I run following script:

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/domain --update-php-settings $i -settings php.txt; done

After that I see:

# /usr/local/psa/bin/domain --show-php-settings test1.com
General settings:
safe_mode = off
session.save_path = /tmp
open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}
error_reporting = 4177
Performance settings:
Additional directivies:

Most probably that content of file is not correct and you can try to fix it :)
 
/usr/local/psa/bin/domain --update-php-settings ecarti.net -additional-settings file.txt

where you can add date.timezone = "Europe/Berlin"
 
Last edited:
Back
Top