{"id":316,"date":"2025-04-28T12:59:00","date_gmt":"2025-04-28T10:59:00","guid":{"rendered":"https:\/\/www.24x7serverguard.com\/blog\/?p=316"},"modified":"2025-04-28T13:33:45","modified_gmt":"2025-04-28T11:33:45","slug":"how-to-migrate-multiple-accounts-between-cpanel-servers-easily","status":"publish","type":"post","link":"https:\/\/www.24x7serverguard.com\/blog\/cpanel\/how-to-migrate-multiple-accounts-between-cpanel-servers-easily\/","title":{"rendered":"How to Migrate Multiple Accounts Between cPanel Servers Easily"},"content":{"rendered":"\n<p>When migrating multiple cPanel accounts from one server to another, it&#8217;s essential to first create individual account packages. Start by creating a file named <code>Migrating-Accounts.txt<\/code>, listing all usernames you wish to migrate. Then, set up a <code>Migration<\/code> directory to store the packaged files. Use the following command to package and move each account:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">for <\/mark>i<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"> in <\/mark><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">cat<\/mark> \/home\/Migrating-Accounts.txt<\/code>; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">do<\/mark> \/scripts\/pkgacct <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">$i<\/mark>; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">mv <\/mark>\/home\/cpmove-<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">$i<\/mark>.tar.gz \/home\/Migration\/; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">done<\/mark><\/p>\n\n\n\n<p>For bulk reseller account migration, retrieve all usernames with:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">cat <\/mark>\/etc\/trueuserowners | grep username | awk <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">&#8216;{print &#8220;\/scripts\/pkgacct &#8220;$1}&#8217;<\/mark><\/p>\n\n\n\n<p>or create a username list using:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">cat <\/mark>\/etc\/trueuserowners | awk<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"> &#8216;{print $1}&#8217; <\/mark>> 1.txt<\/p>\n\n\n\n<p>(remove any colons &#8220;:&#8221; from the file).<br>Then run:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">for <\/mark>i <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">in <\/mark><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">cat <\/mark>1.txt<\/code>; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">do <\/mark>\/scripts\/pkgacct <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">$i;<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">mv <\/mark>\/home\/cpmove-<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">$i<\/mark>.tar.gz \/home\/Migration\/; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">done<\/mark><\/p>\n\n\n\n<p>After packaging, move the <code>Migration<\/code> directory and <code>1.txt<\/code> file to the destination server, and restore all accounts with:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">for <\/mark>i <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">in <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">&#8216;<code>ca<\/code><\/mark><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">t <\/mark>1.txt<\/code>&#8216;; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">do <\/mark>\/scripts\/restorepkg <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">$i<\/mark>; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">done<\/mark><\/p>\n\n\n\n<p>This method ensures a smooth, efficient transfer of single or reseller cPanel accounts between servers.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When migrating multiple cPanel accounts from one server to another, it&#8217;s essential to first create individual account packages. Start by creating a file named Migrating-Accounts.txt, listing all usernames you wish to migrate. Then, set up a Migration directory to store the packaged files. Use the following command to package and move each account: for i [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":320,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[309,307,310,311,308],"class_list":["post-316","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","tag-cpmove","tag-migrate-multiple-accounts-between-cpanel-servers-easily","tag-package","tag-restore-script","tag-script"],"_links":{"self":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":1,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":319,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions\/319"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/media\/320"}],"wp:attachment":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}