How to restore Plesk from a hard disk drive if the Operating System is broken and the HDD with the old installation is mounted to the new server?

Created:

2016-11-16 13:09:13 UTC

Modified:

2017-07-02 04:22:21 UTC

2

Was this article helpful?


Have more questions?

Submit a request

How to restore Plesk from a hard disk drive if the Operating System is broken and the HDD with the old installation is mounted to the new server?

Applicable to:

  • Plesk for Linux

Symptoms

The server is broken and the operating system does not boot. Hard drive is mounted to a new Plesk server of the same version and it is required to transfer Plesk data to the new server.

Resolution

If you prefer to let Plesk professionals handle the migration or upgrade job for you please check out Plesk professional services options on our website: https://www.plesk.com/help-center/professional-services

The best way to do this is to make a Plesk backup using the PleskX.pl migration agent, then restore it on the new server. Follow the steps below:

  • Mount the old drive, for example to the " /restore " folder. If there are several partitions on the old drive (for example " / " and " /var "), they should all be mounted as they were in the old system (so that " / " is mounted to " /restore/ " and " /var/ " to " /restore/var/ ").

  • Stop all Plesk services on the new system with this command:

    # service psa stopall
  • Create a new directory on the old drive and make sure it has the proper permissions (0755):

    # mkdir /restore/migration
    # chmod 0755 /restore/migration
  • Copy the migration agent to this location (after making sure there is enough free disk space to perform the dump):

    # cp -r /usr/local/psa/PMM/agents/shared/ /usr/local/psa/PMM/agents/PleskX/* /restore/migration
  • Ensure that the old drive mounted to " /restore/ " has a " /dev " directory with all the required data. Otherwise, copy the data from " /dev " to " /restore/dev ":

    # cp -rp /dev/* /restore/dev/
  • Chroot to the root folder of the old server ( /restore in our case):

    # export SHELL=/bin/bash
    # chroot /restore
  • Start MySQL from the old drive in the new chrooted environment:

    # service mysqld start
  • Run the migration agent to make the Plesk dump:

    # cd  /migration
    # chmod +x ./PleskX.pl
    # ./PleskX.pl --dump-all -v5
  • Exit from the chrooted shell after the dump process is finished and create an archive folder in the migration directory:

    # mkdir /restore/migration/archives
  • Move all files except for dump.xml from " /restore/migration/ " to the " /restore/migration/archive " folder.

  • In Plesk 9.5 and older it is possible to import this data via the Plesk GUI. Go to Home > Migration Manager > Transfer data already processed by the migration agent and located on the local host and specify the dump.xml location (e.g. /restore/migration/dump.xml ).

  • In Plesk 10 and newer the data is restored using the following command:

    # /usr/local/psa/bin/pleskrestore --restore ./dump.xml -level server

How must a Plesk server be prepared for migration?

Is it possible to migrate data to a Plesk server manually using the PMM tool in Plesk 8?

See also How to restore a Plesk installation on a new server after a disaster

Have more questions? Submit a request
Please sign in to leave a comment.