cPanel to cPanel Migration: Multiple Domains

cPanel to cPanel Migration multiple domains
This article will help you to migrate multiple domains from one cPanel account to another cPanel account.

Are you having trouble migrating multiple cPanel domains? Don’t worry, here is the official – “cPanel to cPanel Migration – Multiple Domains” guide. Let’s start.

Assume “S” is our source server and “D” is our remote server.

1) Make sure you don’t have any cPanel backups under the “/home” directory in either the “S” or “D” server. If you have, then move it to some other folder.

2) Login to the server “D.”

3) Run the below command.

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

Here what is happening is, you will get all cPanel account names in file “/home/usrlist”.

4) Start a new screen session by running the below command.

screen

( Always use the screen to do long-running tasks. Even if the connection close, it won’t affect the screen session )

5) Run the below command to backup all domains in your system.

for x in $(cat /home/usrlist); do /scripts/pkgacct $x; done

( The above command will take backup of all your domains and put it under the “/home” directory. )

6) Run the below command to move all backups and “usrlist” files to the directory “/home/bck”

cd /home&& mkdir /home/bck&& mv *.tar.gz usrlist /home/bck

7) Use “scp” to move the files under “/home/bck” to the “S” machine. ( It could be a long process. So make sure to run this under “screen” session )

scp -r /home/bck/* root@S machine IP/Hostname:/home

8) After completing the “scp” file transfer, login to the “S” machine

9) Start a “screen” session and run the below command to restore all the backups.

for x in $(cat /home/usrlist); do /scripts/restorepkg $x; done

 

That’s it!! You have migrated all the domains from the “D” machine to your “S” machine.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

cPanel & WHM Management Services

Focus on your business, and let us take care of your cPanel Servers!
From what you are reading, it seems you are interested in cPanel/WHM and related technologies. If you have a moment to spare, please take a look at our cPanel Management Services plan, and which might interest you even more!
cPanel Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.