Tuesday, March 19, 2013

Cpanel account Migration using Scripts



First you have to create a file containing the usernames of the accounts in the old server(users.txt).
================================
Take Backup(script.sh)

for i in `cat /home/users.txt`;
do /scripts/pkgacct $i;
done
================================
To move backup

scp cpmove-*.tar.gz root@IP(New server):/home/

passwd:
================================
rm -rf cpmove-*

=================================
In new Server:

restore Backup

for i in `cat /home/user.txt`;
do /scripts/restorepkg $i;
done

-================================
rm -rf cpmove-*

=================================

No comments:

Post a Comment