Reseller account migration on different server by using script

0

A reseller account can have number of shared server accounts and sometime it becomes hard to manage and migrate all account from one server to another. The below script is an easy way for migrating Reseller and/or Bulk accounts between cPanel servers:

On source server :

cd /home

mkdir /home/Migration

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

On Destination server

vi Migration.txt ( add all username which you want to restore)

cd /home/

rsync -va -e “ssh -p 22″ root@SOURCESERVERIP:/home/Migration/* /home/

for i in cat Migration.txt;do /scripts/restorepkg $i;done

Done

About Author

Leave a Reply

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