HostOnNet Blog

Moving BIG sites in Cpanel

Looking for Linux Server Admin or WordPress Expert? We can help.

Moving sites between Cpanel servers are easy with the WHM Transfer feature.

But some BIG sites fails/time out when moving with WHM Transfer feature. To move such sites, you have do backup and move it to new server and restore. Cpanel provides some tools do make the site backup and restore easy.

Here is how to move a site from SERVER1 to SERVER2.

On SERVER 1 (source)

1. Create Backup

Take backup of the web site with pkgacct

/scripts/pkgacct USERNAME

USERNAME – is the Cpanel login name of the site you want to move.

This will create backup file in /home folder.

/home/cpmove-USERNAME.tar.gz

root@godislove [~]# /scripts/pkgacct keralapa
pkgacct started.
pkgacct version 2.9 – running with uid 0
Copying Reseller Config…Done
Copying SSL Certificates, CSRS, and Keys…Done
Copying Mail files….Done
Copying frontpage files….Done
Copying proftpd file….Done
Copying www logs………….
………
………
………
………
Copying shell…….Done
pkgacctfile is: /home/cpmove-keralapa.tar.gz
Creating Archive ………….
………
Done
md5sum is: 4e77ff26c08094c5df1af9a1e4b88f37

2. Move the Backup to New Server

This can be done several ways, FTP, SCP, RSYNC, etc…

We use another way here, that is we just move the backup to public_html folder of a web site, then download it from SERVER2 with wget command

mv /home/cpmove-USERNAME.tar.gz /home/USERNAME_OF_ANY_SITE/public_html/

Now make the file accessable by public

chmod 777 /home/USERNAME_OF_ANY_SITE/public_html/cpmove-USERNAME.tar.gz

ON SERVER 2 (destination server)

1. Downloading the Backup

cd /home
whet http://websiteonserver1/cpmove-USERNAME.tar.gz

2. Restore the Account

/scripts/restorepkg USERNAME

Now you can edit DNS on SERVER1 and point it to SERVER2.

Then change name servers, wait 24 Hours to propogate, verify it is pointing directly to new server, then you can delete the site from old server safely.

Posted in Uncategorized. Bookmark the permalink.

7 Responses to Moving BIG sites in Cpanel

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.