View Single Post


Old
  Post #1 (permalink)   01-13-2019, 07:58 AM
el5olfaa.com
HD Newbie
 
Join Date: Apr 2012
Posts: 10
Send a message via MSN to el5olfaa.com

Status: el5olfaa.com is offline
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

Last edited by el5olfaa.com : 01-13-2019 at 08:00 AM.