./plesk-installer --select-release-id RELEASE --skip-patch
List of releases can be retrieved via:
./plesk-installer --show-releases
./plesk-installer --select-release-id RELEASE --skip-patch
List of releases can be retrieved via:
./plesk-installer --show-releases
M_P=$(cat /etc/psa/.psa.shadow); for db in *.sql; do echo "Restoring ${db::-4}"; MYSQL_PWD=$M_P mysql -uadmin < "$db"; done
M_P=$(cat /etc/psa/.psa.shadow); D_C="dump_on_$(date '+%F-%H:%M')"; mkdir "$D_C" && for db in $(MYSQL_PWD=$M_P mysql -uadmin -Nse 'SHOW DATABASES'); do MYSQL_PWD=$M_P mysqldump -uadmin -R --skip-extended-insert "$db" > "$D_C$db.sql"; done
plesk db "SELECT d.name AS 'Subscription', IF (p.value = 'true', 'Enabled', 'Disabled') AS 'DKIM Status' FROM domains d LEFT JOIN DomainServices ds ON d.id = ds.dom_id LEFT JOIN (SELECT * FROM Parameters WHERE parameter = 'domain_keys_sign') p ON ds.parameters_id = p.id WHERE ds.type = 'mail';"
INFO=($(MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -sN -e'SELECT h.www_root,s.login FROM domains d, hosting h, sys_users s WHERE s.id=h.sys_user_id AND h.dom_id=d.id AND d.name="example.com"')); chown -R ${INFO[1]}:psacln ${INFO[0]}; chown ${INFO[1]}:psaserv ${INFO[0]}
Starting from Plesk 17.8 it can be done easier
plesk repair fs example.com
plesk sbin mail_auth_view
This could be useful for debugging via diff -u (better using vimdiff if installed)
MYSQL_PWD=$(cat /etc/psa/.psa.shadow) mysqldump -uadmin --skip-extended-insert psa > psa_dump_on_"$(date '+%F-%H:%M')".sql
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" systemctl restart mysql systemctl unset-environment MYSQLD_OPTS systemctl restart mysql
sudo -u the_user bash -s "find /path/to/directory ! -readable"
su otheruser bash -c "id"[/shell][shell]sudo -u the_user bash -s "id"