Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to restore a Plesk server on a new Linux server from file system?

 
backup restore migrationdatabasedatabase serveremailemail security

Question

  • How to restore a Plesk server on a new Linux server from file system?
  • How to execute disaster recovery in order to restore a Plesk server on a brand new Linux Plesk server?
  • How to restore a Plesk server on a brand new Linux Plesk server by using disk drive data only?

Answer

In order to restore a Plesk server on another Linux server by using the steps below, the new Plesk server must meet the following requirements:

  • The versions of the following components on the newly set up server must be the same as the versions used on the old server:

    • Operating system
    • Plesk version
    • MySQL or MariaDB
  • A valid Plesk license should be activated on the new server

  • The same set of Plesk extensions must be installed on the new server

    Note: Several Plesk extensions, for example Plesk Premium Email and Plesk Email Security need additional setup. Make sure all necessary packages of extensions are installed in Extensions > <extension_name> > Open.

If you prefer to let Plesk professionals handle the restoration, contact the Plesk professional services here: https://www.plesk.com/professional-services/

In the following steps, it is assumed that the hard drive from the old server is mounted to the directory /old on the new server.

  1. Connect to the new Linux server using SSH

  2. Create database backups with old server's data directory:

    2.1. Start the MySQL/MariaDB server with the datadir parameter in /etc/my.cnf pointing to the MySQL database location on the old drive ( /old/var/lib/mysql):

    # cat /etc/my.cnf | grep datadir
    datadir=/old/var/lib/mysql

    2.2. Create dumps of all MySQL/MariaDB databases:

    # MYSQL_PWD=`cat /old/etc/psa/.psa.shadow` mysql -u admin psa -Ns -e"select name from data_bases where type = 'mysql'" | while read dbname ; do MYSQL_PWD=`cat /old/etc/psa/.psa.shadow` mysqldump -u admin --databases $dbname > $dbname.sql ; done

    2.3. Stop MySQL/MariaDB service and revert the datadir parameter in /etc/my.cnf to its original value:

    # service mysqld stop
    # cat /etc/my.cnf | grep datadir
    datadir=/var/lib/mysql

    2.4. Start MySQL/MariaDB service and restore the databases:

    # service mysqld start
    # for f in *.sql ; do dbname=$(echo $f | sed -e 's/(.sql)$//g'); MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -e "create database $dbname"; MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -D$dbname < $f; echo "$dbname restored" ; done

  3. Restore the Plesk database from the latest available dump:

    3.1. Stop the Plesk service:

    # service psa stopall

    3.2. Start the database server:

    # service mysqld start

    3.3. Import the database dump:

    # zcat /old/var/lib/psa/dumps/mysql.daily.dump.0.gz | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin

  4. Copy the Plesk database password file:

    # cp -rpf /old/etc/psa/.psa.shadow /etc/psa/.psa.shadow

  5. Copy the encryption key to the new server, set the correct permissions and restart MySQL service:

    # cp /etc/psa/private/secret_key /etc/psa/private/secret_key.save
    # cp -rpf /old/etc/psa/private/secret…

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Plesk with Centralized Database and Network File System

Read More »

Advanced Techniques for Building an Email List

Read More »

How Modern Secure and Self-Hosted Messaging has Become a Cornerstone for Teams Worldwide

Read More »
Knowledge Base

Emails are not sent/received when Plesk Email Security is installed: Access denied for user ‘<database_name>’@’127.0.0.1’ (using password: YES) – Plesk

Read More »

Plesk Email Security extension blocklist does not work

Read More »

Plesk or system update fails on Linux: http://yum.mariadb.org/10.1/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 – Not Found

Read More »

All emails are bounced back and not sent with Plesk Email Security enabled

Read More »

Hosting Wiki

  • Encryption
  • Content Security Policy ( CSP )
  • Server Redundancy
  • Linux Containers
  • AMP
  • Bare Metal Server
  • SSI
  • Backup
  • MySQL
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • SQL
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
  • Email Autoresponder
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family