Monday, 25 April 2011

Steps to migrate a large site from WHM/cPanel

If you are familiar with WHM/cPanel, you sure have this problem while trying to migrate a website more than 2GB and found out the file/folder or any data not updated.

But before that, please understand the command as below.

$ /scripts/pkgacct username

$ rsync

Your site migration will down for minutes(depend on the size).

1. Go to the user root directory.

$ cd /home/username/

2. Move the public_html folder out to /home folder.

$ mv public_html /home

3. Using pkgacct to compress the file with cPanel format where the username is your cPanel username.

$ /scripts/pkgacct username

4. Once done, SCP it to the new server and move the public_html back to the user folder.

$ scp /home/cpmove-username.tar.gz;mv /home/public_html /home/username

5. From new server, restore it.

$ /scripts/restorepkg username

6. Once done, rsync (xcopy in Windows) from old server to new server, where username is the cPanel username, and IP is the destination IP.

$ rsync -e "ssh" -avz /home/username/public_html/ root@IP:/home/username/public_html

7. Once done, you may proceed to update the DNS.

No comments:

Post a Comment