Sometimes there is a need or desire to manually transfer accounts between cPanel servers. The following outlines how this is done.
The first consideration on the source and destination server is space needed in order to have the account back ups generated and stored during this process. This may even require adding a hard drive temporarily and use this for the backup mount. Let's say that is what's done and the backup drive is mounted as /transferdata
The following will run a backup on all accounts and place that backup into /transferdata
for x in `ls /var/cpanel/users|grep -v \/`; do /scripts/pkgacct $x /transferdata; done
Once this completes the backups would need to be transferred using something like SFTP or SCP from the source server to the destination server. Let's say they are transferred into /restoredata on the destination server. The following can be used
ls cpmove*.tar.gz | cut -d\- -f2- | cut -d\. -f1 | while read x ; do /scripts/restorepkg --force $x ;done