cPanel tranfer large account

If you are system administrator you will regularly come across tasks of migrating extremely large accounts, some have even size of terabytes. In this case you can’t simply use the pkgaccount function and transfer whole account. As it takes very long time to finish and 95% of the time you will always find files missing after restoring the account. So what I did was was use pkgaccount with skiphomedir parameter. It will make backup of account skipping home directory. You can restore it on new server and after that rsync the home directory. So that no files may miss during transfer.

Make pkgaccount and transfer it to new server
[bash]
/scripts/pkgacct –skiphomedir servertechsupport
scp /home/cpmove-servertechsupport.tar.gz root@NEW_SERVERIP:/home
[/bash]
Now on the new server restore the account and rsync the home directory
[bash]
/scripts/restorepkg /home/cpmove-servertechsupport.tar.gz
rsync -avz root@OLD_SERVER_IP:/home/servertechsupport/* /home/servertechsupport/
[/bash]

You should run the rsync command in screen so that it will continue running in background even if your shell got disconnected.


Comments

One response to “cPanel tranfer large account”

  1. Thank you, this is a very useful article.

    We were migrating a live site over from one server to another and the tarball kept being corrupt because of files being in use like temp and session files.

    So we ended up using your method with the –skiphomedir and then syncing the actual files over after restoring the account.

Leave a Reply

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


five × 1 =