Create Plesk backup with the pleskbackup utility on the old server. For example:
~# /usr/local/psa/bin/pleskbackup clients CLIENT.LOGIN <backup_file>
Then move the backup to the new server and restore it using the Plesk CLI utility pleskrestore. Note that the old server and the new server can be the same. During the backup restoration, a special map file is required by the pleskrestore utility. It provides mapping between old and new IP addresses and database servers. You may create a map file with the option "--create-map" (or "--conflicts-resolution" in Parallels Plesk Panel version 9.x) in the pleskrestore utility:
~# /usr/local/psa/bin/pleskrestore --create-map <backup_file> -map <map_file> WARNING: Backup file has wrong signature for this server ~#
[For Plesk 9.x]: notification "
WARNING: Backup file has wrong signature for this server" is shown if the backup is restored on a different server than the one it was created on.
If the file
~# cat map_file [ip-map] # Unchanged IP addresses: # Please review default IP addresses mapping below: 192.168.34.80 shared -> 192.168.34.88 shared # NOTE : It's not recommended to modify this section [CLIENT.LOGIN] 192.168.34.80 DOMAIN.TLD 192.168.34.80 mysql::@localhost:3306 ~#
192.168.34.80 is the IP address of the old server where the backup was created. 192.168.34.88 is the IP address of the new server where the backup is being restored. To restore the backup with "-level domains", reconfigure the map file and replace the old IP address (192.168.34.80) with the new one (192.168.34.88) in all objects:
~# cat map_file [ip-map] # Unchanged IP addresses: # Please review default IP addresses mapping below: 192.168.34.80 shared -> 192.168.34.88 shared # NOTE : It's not recommended to modify this section [CLIENT.LOGIN] 1192.168.34.88 DOMAIN.TLD 192.168.34.88 mysql::@localhost:3306 ~#
It is not necessary to modify the map file if you are going to use "-level clients" or "-level server" flags during the restoration process. IP address mapping is performed with the line "
192.168.34.80 shared -> 192.168.34.88 shared".
Note that the type of the old IP address should be the same as the type of the new IP address: either "
192.168.34.80 shared -> 192.168.34.88 shared" or "
192.168.34.80 exclusive -> 192.168.34.88 exclusive". If the type of the new IP address does not match the old one, change it at Parallels Plesk Panel UI (
Server > IP Addresses > 192.168.34.88 > IP type).
Verify that the map file is valid:
~# /usr/local/psa/bin/pleskrestore --validate-map map_file Map file is valid ~#
Once the validity of the map file is verified, use it to restore data:
~# /usr/local/psa/bin/pleskrestore --restore <backup_file> -level clients -filter list:CLIENT.LOGIN -map <map_file>
Get the full list of the parameters that can be provided to the pleskrestore utility using the "--help" option.
For more information about related functionality refer to Transferring Data Through Backup Files.