Hosting Discussion

Hosting Discussion (https://www.hostingdiscussion.com/)
-   Hardware and Server Configuration (https://www.hostingdiscussion.com/hardware-server-configuration/)
-   -   How to transfer whole cpanel websites to another (https://www.hostingdiscussion.com/hardware-server-configuration/69977-how-transfer-whole-cpanel-websites-another.html)


el5olfaa.com 01-13-2019 07:58 AM

How to transfer whole cpanel websites to another
 
Hello,

From time to time we need to upgrade or downgrade to different server depending our usage so today i will explain to you how to transfer whole cpanel server websites to another cpanel server with the best way to do that .

Let's follow my instructions :
1) If you need to suspend your websites to prevent new data being missed during the transfer process connect to your server shell and do the following command to suspend all accounts :
Code:

for i in `ls /var/cpanel/users`; do /scripts/suspendacct $i ; done
2) Now we can create an new fresh backup of all accounts using the following command :
Code:

for i in `ls /var/cpanel/users`; do /scripts/pkgacct --no-compress $i ; done
The attribute "--no-compress" tells the backup script not to compress the backup to get them a lot faster than compressing them but take in your consideration this is consume more disk space .

3) After the new backups are ready we will transfer them to the new cpanel server, replace x.x.x.x with your new server ip in this command :
Code:

scp /home/*.tar root@x.x.x.x:/home/
Close shell connection to your old server we don't need to do any thing more on it from now .

Then you will be asked for the destined server shell password .

4) After backups transfer has been completed we will restore them, now connect to your new cpanel server shell and do the following command to start this process :
Code:

for i in `ls /home/*.tar`; do /scripts/restorepkg --force $i ; done
5) Unsuspend all accounts on new server using the following command :
Code:

for i in `ls /var/cpanel/users`; do /scripts/unsuspendacct $i ; done
6) Now you need to set your main domain name servers ip address to your new server and wait to be fully stable during 24 hour .

7) Check all your websites data if every thing is good you can now delete all backups in home doing the following command :
Code:

rm -rf /home/*.tar
That's all .

Good luck

cyclonehosting 04-04-2019 09:09 PM

Hi,
Thanks so much for this information. This is great information if the person does not have WHM access. Doing it from ssh is a great way to do that. Usually if a hosting company gives the user root access, the user should have WHM access as well. WHM has a transfer tool which is great and easy to use, just plug in the old server information, and it will detect all cpanel accounts. You can click on the ones to transfer and they will all transfer for you.


All times are GMT -6. The time now is 07:24 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0