{"id":956,"date":"2014-11-06T01:46:23","date_gmt":"2014-11-06T01:46:23","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=956"},"modified":"2014-11-06T01:46:23","modified_gmt":"2014-11-06T01:46:23","slug":"manaul-migration-slaved-drive-new-one","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/11\/06\/manaul-migration-slaved-drive-new-one\/","title":{"rendered":"Manual Migration from slaved drive to new one"},"content":{"rendered":"<p>The following guide was taken from Cpanel support forum. This information is when you need to migrate Cpanel account information from one drive or to another.<\/p>\n<p><strong>Manually moving Cpanel<\/strong><\/p>\n<p>These commands will allow you to manually migrate all customer data and configs from an old primary drive installed as a slave.<\/p>\n<p>source drive should be mounted to \/mnt\/slave1<\/p>\n<p>run chkrootkit to make sure you don&#8217;t copy back infected files.. chkrootkit &#8212; locally checks for signs of a rootkit <\/p>\n<p>now we can start copying back data from the old drive <\/p>\n<p>Run these rSync commands to move everything over:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# rsync -vrplogDtH \/slave1\/usr\/local\/apache\/conf \/usr\/local\/apache\n# rsync -vrplogDtH \/slave1\/var\/named \/var\n# rsync -vrplogDtH \/slave1\/home\/* \/home\n# rsync -vrplogDtH \/slave1\/usr\/local\/cpanel \/usr\/local\n# rsync -vrplogDtH \/slave1\/var\/lib\/mysql \/var\/lib\n# rsync -vrplogDtH \/slave1\/var\/cpanel \/var\n# rsync -vrplogDtH \/slave1\/usr\/share\/ssl \/usr\/share\n# rsync -vrplogDtH \/slave1\/var\/ssl \/var\n# rsync -vrplogDtH \/slave1\/usr\/local\/cpanel\/3rdparty\/mailman \/usr\/local\/cpanel\/3rdparty\n# rsync -vrplogDtH \/slave1\/var\/log\/bandwidth \/var\/log\n# rsync -vrplogDtH \/slave1\/usr\/local\/frontpage \/usr\/local\n# rsync -vrplogDtH \/slave1\/var\/spool\/cron \/var\/spool\n# rsync -vrplogDtH \/slave1\/root\/.my.cnf \/root\n# rsync -vrplogDtH \/slave1\/etc\/httpd\/conf\/httpd.conf \/etc\/httpd\/conf\n\n<\/pre>\n<p>* rsync options<br \/>\n-v, &#8211;verbose               increase verbosity<br \/>\n-r, &#8211;recursive             recurse into directories<br \/>\n-p, &#8211;perms                 preserve permissions<br \/>\n-l, &#8211;links                 copy symlinks as symlinks<br \/>\n-o, &#8211;owner                 preserve owner (super-user only)<br \/>\n-g, &#8211;group                 preserve group<br \/>\n-D                          same as &#8211;devices &#8211;specials<br \/>\n-t, &#8211;times                 preserve modification times<br \/>\n-H, &#8211;hard-links            preserve hard links<\/p>\n<p>See a list of all the options &#8211; <\/p>\n<p>cd to the old etc directory:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n#cd \/slave1\/etc\n\n<\/pre>\n<p>And copy some files from here:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# rsync -vrplogDtH secondarymx domainalias valiases vfilters exim* proftpd* pure-ftpd* passwd* group* *domain* *named* wwwacct.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl hosts \/etc \n\n<\/pre>\n<p>Update cpanel afterwards <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# \/scripts\/upcp\n# \/scripts\/updatenow\n# \/scripts\/sysup\n# \/scripts\/fixeverything\n# \/scripts\/exim4\n# \/scripts\/easyapache\n# \/scripts\/securetmp \n\n<\/pre>\n<p>Restarting services<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# \/scripts\/restartsrv httpd\n# \/scripts\/restartsrv cpanel\n# \/scripts\/restartsrv mysql\n# \/scripts\/restartsrv named\n# \/scripts\/restartsrv exim \n\n<\/pre>\n<p>Source: http:\/\/forums.cpanel.net\/f49\/help-moving-cpanel-accounts-damaged-disk-163734.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following guide was taken from Cpanel support forum. This information is when you need to migrate Cpanel account information from one drive or to another. Manually moving Cpanel These commands will allow you to manually migrate all customer data and configs from an old primary drive installed as a slave. source drive should be &#8230; <a title=\"Manual Migration from slaved drive to new one\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/11\/06\/manaul-migration-slaved-drive-new-one\/\" aria-label=\"Read more about Manual Migration from slaved drive to new one\">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":[20,66],"tags":[],"class_list":["post-956","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-migration"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/956","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=956"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/956\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}