Upgrade Script Examples (Linux)

This section provides notes on implementation and execution of an upgrade script, and also presents a couple of script samples.

Implementation and Executions Notes
  • To avoid being prompted for password each time you connect via SSH to the servers where Plesk should be installed, place your public key to the list of authorized keys of a user on whose behalf the script is run on each server (see SSH documentation for details on the procedure).
  • If you have a local mirror of the Plesk updates server (as described in the chapter Appendix C: Mirroring Plesk updates Server), use the following option:

    --source <mirror URL>

Example

This script upgrades Plesk installed on the specified servers to the latest available version.

#!/bin/sh

SERVERS_LIST="node1.example.com node2.example.com"

for current_server in $SERVERS_LIST; do
ssh -f root@$current_server 'plesk installer --select-release-latest --upgrade-installed-components --notify-email admin@example.com'
done
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.