Monday, January 29, 2007

Plesk and migration

Migrating accounts between plesk servers is very simple. In most cases I just want to migrate a client with all their accounts and all their settings:
sudo -s
echo 'client_name' | /opt/psa/bin/pleskbackup --clients backup_file -list -
exit
scp backup_file_name username@remote_host:
That takes care of the backup and transfer, so all that is needed is a quick mapping of IP addresses on the new host and a restore. Disable the client on the initial server to ensure that mail doesn't get delivered and lost.
ssh username@remote_host
sudo -s
/opt/psa/bin/pleskrestore --create-map backup_file -map map_name
/opt/psa/bin/pleskrestore --restore backup_file -level clients -map map_name
exit
You'll need to ensure that the mapping of the domains for the client is done correctly if there are multiple IP addresses on both systems. Most of the time, Plesk gets it correct.

Flick the DNS and all is done with minimal downtime.

No comments: