For Linux and Shell scripting.

Plesk restore: Restore domains from old hard drive

Leave a comment

The operating system must be reloaded onto a separate disk, which will become the primary, and old disk can be mounted as a different mount point like /restore. Plesk actually has a nice migration tool (, and as such, a disk to disk-based migration is easy to accomplish. The following steps can be used:

1. Mount the old drive, for example to the /restore directory. If there are several partitions on the old drive, for example / and /var, they all should be mounted as they were in the old system, so / is mounted to /restore/ and /var/ to /restore/var/

2. Stop all Plesk services in the new system with:
# /etc/init.d/psa stopall

3. Copy the migration agent to the old drive (make sure that there is enough free disk space to perform the dump):
# mkdir /restore/migration
# mkdir /restore/migration/archives
#cp -r /usr/local/psa/PMM/agents/shared/* /usr/local/psa/PMM/agents/PleskX/* /restore/migration

4. chroot to the root directory of the old server (/restore in our case):
# export SHELL=/bin/bash
# chroot /restore

5. Start MySQL from the old drive in the new chrooted environment:
# /etc/init.d/mysql start

6. Run migration agent to make Plesk dump (note, this may take a few hour depending on the amount of data to backup):
# cd /migration
# ./ –dump-all -v5

7. Move all files except for dump.xml from /restore/migration/ to /restore/migration/archive directory.

8. You can now import data via the Plesk control panel. Select the import option on the Server->Migration page and specify /restore/migration (used in this example) as the working directory.

~Jimmy Thomas


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s