{"id":584,"date":"2009-11-11T06:32:24","date_gmt":"2009-11-11T11:32:24","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=584"},"modified":"2009-11-11T06:32:24","modified_gmt":"2009-11-11T11:32:24","slug":"rsync-cpanel-server-cloning","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/","title":{"rendered":"Rsync Cpanel Server (Cloning)"},"content":{"rendered":"<pre>\n<div id=\"bodyContent\">\n\nThis script will copy everything necessary for a full cpanel -&gt; cpanel transfer.\nYou need to open the script up and change 127.0.0.1 to the FQDN or IP of the\ntarget server. It will first create a key pair and then transfer it to the\ntarget server. Root level access is required for this script to work properly.\nAfter this runs you will need to update the network configuration on the new\nserver and reboot or restart networking.<\/div><\/pre>\n<pre>#!\/bin\/sh\n#\n# HOST = User + IP \/ Hostname to copy files TO.\nHOST=\"root@PUTDESTINATIONIP\"\n\necho Creating key pair...\nssh-keygen -t dsa\necho Create .ssh directory on destination server...\nssh $HOST 'mkdir \/root\/.ssh'\nscp \/root\/.ssh\/id_dsa.pub $HOST:~\/.ssh\/authorized_keys\n\n# \/etc User \/ IP's + passwd files\necho Transferring \/etc\nrsync -aqHl -e ssh \/etc\/passwd $HOST:\/root\/\nrsync -aqHl -e ssh \/etc\/shadow $HOST:\/root\/\nrsync -aqHl -e ssh \/etc\/group $HOST:\/root\/\nrsync -aqHl -e ssh \/etc\/wwwacct.conf $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/quota.conf $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/domainalias $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/remotedomains $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/localdomains $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/userdomains $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/valiases $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/vfilters $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/vmail $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/trueuserdomains $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/trueuserowners $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/ips $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/ipaddresspool $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/services $HOST:\/etc\/\n\n# ftpd files\necho Transferring FTP configs\nrsync -aqHl -e ssh \/etc\/sysconfig\/pure-ftpd $HOST:\/etc\/sysconfig\/\nrsync -aqHl -e ssh \/etc\/pure-ftpd.conf $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/pure-ftpd $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/proftpd $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/proftpd.* $HOST:\/etc\/\n\n# \/var\necho Transferring \/var\nrsync -aqHl -e ssh \/var\/cpanel $HOST:\/var\/\nrsync -aqHl -e ssh \/var\/spool\/cron $HOST:\/var\/spool\/\n\n# \/usr config - 3rdparty\necho Transferring 3rd party and SSL certs\nrsync -aqHl -e ssh \/usr\/share\/ssl $HOST:\/usr\/share\/\nrsync -aqHl -e ssh\/usr\/local\/cpanel\/3rdparty\/mailman $HOST:\/usr\/local\/cpanel\/3rdparty\/\nrsync -aqHl -e ssh \/usr\/local\/cpanel\/base\/frontend $HOST\/usr\/local\/cpanel\/base\/\n\n# Apache\necho Transferring Apache configs\nrsync -aqHl -e ssh \/usr\/local\/apache\/conf $HOST:\/usr\/local\/apache\/\nrsync -aqHl -e ssh \/usr\/local\/apache\/libexec $HOST:\/usr\/local\/apache\/\nrsync -aqHl -e ssh \/usr\/local\/frontpage $HOST:\/usr\/local\/\n\n# Mysql config\necho Transferring MySQL configs\nrsync -aqHl -e ssh \/root\/.my.cnf $HOST:\/root\/\nrsync -aqHl -e ssh \/etc\/my.cnf $HOST:\/etc\/\n\n# Named\necho Transferring zone files and bind configs\nrsync -aqHl -e ssh \/var\/named $HOST:\/var\/\nrsync -aqHl -e ssh \/etc\/named.conf $HOST:\/etc\/\nrsync -aqHl -e ssh \/etc\/rndc.conf $HOST:\/etc\/\n\n#User Files\n# Mysql\necho Transferring MySQL databases\nrsync -aqHl -e ssh \/var\/lib\/mysql\/* $HOST:\/var\/lib\/mysql\/\n\n# Home\necho Tansferring \/home\nrsync -aqHl -e ssh \/home\/* $HOST:\/home\/<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This script will copy everything necessary for a full cpanel -&gt; cpanel transfer. You need to open the script up and change 127.0.0.1 to the FQDN or IP of the target server. It will first create a key pair and then transfer it to the target server. Root level access is required for this script&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,13],"tags":[],"class_list":["post-584","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-scripts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rsync Cpanel Server (Cloning) - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rsync Cpanel Server (Cloning) - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"This script will copy everything necessary for a full cpanel -&gt; cpanel transfer. You need to open the script up and change 127.0.0.1 to the FQDN or IP of the target server. It will first create a key pair and then transfer it to the target server. Root level access is required for this script... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2009-11-11T11:32:24+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Rsync Cpanel Server (Cloning)\",\"datePublished\":\"2009-11-11T11:32:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/\"},\"wordCount\":4,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"cPanel\",\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/\",\"name\":\"Rsync Cpanel Server (Cloning) - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2009-11-11T11:32:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/rsync-cpanel-server-cloning\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rsync Cpanel Server (Cloning)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rsync Cpanel Server (Cloning) - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/","og_locale":"en_US","og_type":"article","og_title":"Rsync Cpanel Server (Cloning) - Linux Shtuff","og_description":"This script will copy everything necessary for a full cpanel -&gt; cpanel transfer. You need to open the script up and change 127.0.0.1 to the FQDN or IP of the target server. It will first create a key pair and then transfer it to the target server. Root level access is required for this script... Read More","og_url":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2009-11-11T11:32:24+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Rsync Cpanel Server (Cloning)","datePublished":"2009-11-11T11:32:24+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/"},"wordCount":4,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["cPanel","Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/","url":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/","name":"Rsync Cpanel Server (Cloning) - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2009-11-11T11:32:24+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/rsync-cpanel-server-cloning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Rsync Cpanel Server (Cloning)"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=584"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/584\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}