Saturday, 25 October 2014

Via script Migration of cPanel accounts

Old server

Take Backup
========
vi 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/

scp -P22 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



For force restore
=============
for i in `cat /home/user.txt`;
do /scripts/restorepkg  --force $i;
done



rm -rf cpmove-*


=================
Make & Move multiple cPanel user backups

 
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:

No comments:

Post a Comment