For migrating Re-seller or Bulk accounts between cpanel servers

At current source server

cd /home
Create a directory called Migration_res (Any directory name which you can remember for migration process)

mkdir /home/Migration_res

cat /etc/trueuserowners |grep reseller_username | awk ‘{print $1}’ | cut -d: -f 1 > Migration.txt
for i in `cat Migration.txt`;do /scripts/pkgacct $i; mv /home/cpmove-$i.tar.gz /home/Migration/;done

At remove server Destination server

vi Migration.txt ( add all username which you want to restore)
cd /home/
rsync -va -e “ssh -p 22” root@destinationserverIP:/home/Migration/* /home/
for i in `cat Migration.txt`;do /scripts/restorepkg $i;done

Advertisements