Migrate/Transfer Multiple cPanel Accounts without WHM Transfer tools

First of all remove any backup file present under /home directory using the command

rm -rf /home/cpmove-*

Create the list of accounts you wish to migrate using the below commands.

cat /etc/trueuserdomains | awk '{print $2}' > /home/accountlist

Now you have the list of account in the file  /home/accountlist

Suppose that you have 100 accounts and wish to move only 50 account use the command below to create list of 50 accounts

cat /etc/trueuserdomains | awk '{print $2}' | head 50 > /home/accountlist

If you are moving only 50 account use the below steps to create list of another rest of accounts and follow the same steps

cat /etc/trueuserdomains | awk '{print $2}' | tail 50 > /home/accountlist

Now create backups of accounts in the list using the below command

for i in $(cat /home/accountlist); do /scripts/pkgacct --force $i; done

Once backup is created copy the backups to the new server

scp cpmove-* root@New_server_ip:/home

Once the account is copied copy the account list

scp /home/accountlist  root@New_server_ip:/home/accountlist

Now login to the new server

Restore all the accounts using the below command

for i in $(cat /home/accountlist); do /scripts/restorepkg --force $i; done

Now we are done with the migration!!

 3,652 total views,  3 views today


So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *