{"id":2569,"date":"2015-08-20T01:01:54","date_gmt":"2015-08-20T01:01:54","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=2569"},"modified":"2015-08-20T01:01:54","modified_gmt":"2015-08-20T01:01:54","slug":"restoring-plesk-domains-from-a-slaved-hard-drive","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/08\/20\/restoring-plesk-domains-from-a-slaved-hard-drive\/","title":{"rendered":"Restoring Plesk domains from a slaved hard drive"},"content":{"rendered":"<p>If a manual transfer is required (for mail content, a complete server after a crash, database moving, etc.), refer to the following sources:<\/p>\n<p><a href=\"http:\/\/kb.odin.com\/112699\" target=\"_blank\" rel=\"noopener\">112699<\/a> How to restore a Plesk installation on the new server after a disaster<br \/>\n<a href=\"http:\/\/kb.odin.com\/3072\" target=\"_blank\" rel=\"noopener\">3072<\/a> How do I restore Plesk from the hard disk drive if the Operating System is broken and the HDD with the old OS and Plesk is mounted in the new system?<br \/>\n<a href=\"http:\/\/kb.odin.com\/1152\" target=\"_blank\" rel=\"noopener\">1152<\/a> How to migrate Plesk data manually with Plesk Migration Manager<br \/>\n<a href=\"http:\/\/kb.odin.com\/6518\" target=\"_blank\" rel=\"noopener\">6518<\/a> How to migrate local database between Plesk servers manually (applicable for versions 8.x and 9.x)<br \/>\n<a href=\"http:\/\/kb.odin.com\/6158\" target=\"_blank\" rel=\"noopener\">6158<\/a> How to migrate \u0421alendar, Personal Address Book, and Horde Webmail preferences manually<br \/>\n<a href=\"http:\/\/kb.odin.com\/5882\" target=\"_blank\" rel=\"noopener\">5882<\/a> How to migrate Plesk and SiteBuilder content and retain Plesk and SiteBuilder integration (applicable for versions 8.x and 9.x)<\/p>\n<p>Steps<\/p>\n<p>How do I restore Parallels 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?<\/p>\n<p><!--more--><\/p>\n<p>Plesk for Linux\/Unix<\/p>\n<p>I mounted the hard drive to a new Plesk server of the same version and want to transfer my Parallels Plesk data to the new server.<\/p>\n<p>Resolution<\/p>\n<p>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:<\/p>\n<p>Mount the old drive, for example to the &#8220;\/restore&#8221; folder. If there are several partitions on the old drive (for example &#8220;\/&#8221; and &#8220;\/var&#8221;), they should all be mounted as they were in the old system (so that &#8220;\/&#8221; is mounted to &#8220;\/restore\/&#8221; and &#8220;\/var\/&#8221; to &#8220;\/restore\/var\/&#8221;). USe df to sewe the old drive:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# df -h\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# mkdir \/restore\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# mount \/dev\/sdb3 \/restore\n<\/pre>\n<p>Stop all Plesk services on the new system with this command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># \/etc\/init.d\/psa stopall\n<\/pre>\n<p>Create a new directory on the old drive and make sure it has the proper permissions (0755):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># mkdir \/restore\/migration\n# chmod 0755 \/restore\/migration\n\n<\/pre>\n<p>Copy the migration agent to this location (after making sure there is enough free disk space to perform the dump):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># cp -r \/usr\/local\/psa\/PMM\/agents\/shared\/* \/usr\/local\/psa\/PMM\/agents\/PleskX\/* \/restore\/migration \n\n<\/pre>\n<p>Ensure that the old drive mounted to &#8220;\/restore\/&#8221; has a &#8220;\/dev&#8221; directory with all the required data. Otherwise, copy the data from &#8220;\/dev&#8221; to &#8220;\/restore\/dev&#8221;:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># cp -rp \/dev\/* \/restore\/dev\/\n\n<\/pre>\n<p>Chroot to the root folder of the old server (&#8220;\/restore&#8221; in our case):<\/p>\n<blockquote><p>Chroot is an operation that changes the apparent root directory for the current running process and their children. A program that is run in such a modified environment cannot access files and commands outside that environmental directory tree. This modified environment is called a chroot jail.<\/p><\/blockquote>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># export SHELL=\/bin\/bash\n# chroot \/restore\n\n<\/pre>\n<p>Start MySQL from the old drive in the new chrooted environment:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# \/etc\/init.d\/mysqld start \n<\/pre>\n<p>Run the migration agent to make the Plesk dump:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# cd  \/migration\n # chmod +x .\/PleskX.pl\n # .\/PleskX.pl --dump-all -v5\n<\/pre>\n<p>Exit from the chrooted shell after the dump process is finished&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# exit\n<\/pre>\n<p>and create an archive folder in the migration directory:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mkdir \/restore\/migration\/archives\n\n<\/pre>\n<p>Move all files except for dump.xml from &#8220;\/restore\/migration\/&#8221; to the &#8220;\/restore\/migration\/archive&#8221; folder.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# mv \/restore\/migration\/* \/restore\/migration\/archive\n<\/pre>\n<p>In Plesk 9.5 and older it is possible to import this data via the Plesk GUI. Go to Home &gt; Migration Manager &gt; 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).<\/p>\n<p>In Plesk 10 and newer the data is restored using the following command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# \/usr\/local\/psa\/bin\/pleskrestore --restore .\/dump.xml -level server\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If a manual transfer is required (for mail content, a complete server after a crash, database moving, etc.), refer to the following sources: 112699 How to restore a Plesk installation on the new server after a disaster 3072 How do I restore Plesk from the hard disk drive if the Operating System is broken and &#8230; <a title=\"Restoring Plesk domains from a slaved hard drive\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2015\/08\/20\/restoring-plesk-domains-from-a-slaved-hard-drive\/\" aria-label=\"Read more about Restoring Plesk domains from a slaved hard drive\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86],"tags":[],"class_list":["post-2569","post","type-post","status-publish","format-standard","hentry","category-plesk"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=2569"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2569\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=2569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=2569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=2569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}