Friday, March 22, 2013

Transfer the reseller account from one Cpanel server to other cPanel server.

EG : From Linux1 server to  Linux2 server.

SSH server as root (to Linux1) .
1) Using following command, this will print all the account user name which are under reseller ownership.
root@Linux1[/home/]#cat /etc/trueuserowners | grep reseller-main-user-name | awk ‘{print$1}’ |  cut -d : -f 1

2) create file backup-user.txt under reseller main account and add all the users listed by above command.

3) Now creating backup for users and move backup files to users home directory.

root@Linux1[/home/resellerusername] # for i in `cat /home/username/backup-user.txt`; do /scripts/pkgacct $i; mv /home/cpmove-$i.tar.gz /home/username/ ; done

Now copy all the backup along with file backup-user.txt  to the destination server (Linux2) in /home partition and execute following command to restore the account.
SSH server as root (to Linux2) .

root@Linux2[/home/]#for i in `cat backup-user.txt `;do /scripts/restorepkg $i;done

No comments:

Post a Comment