Transferring all your cpanel accounts using shell.
First we need to create all accounts backup on your current server, execute following command
cat /var/cpanel/users | while read line; do
/scripts/pkgacct $line
done
/scripts/pkgacct $line
done
All accounts are backuped up under /home, now transfer all accounts backup to your new server using SCP command line.
scp cpmove-* root@new-server-ip:/home
Now to resoter the accounts.
To restore all accounts, put all the users in the file named users on the new server /home
cat /home/users | while read line; do
/scripts/restorepkg $line
done
/scripts/restorepkg $line
done
Leave a Reply
You must be logged in to post a comment.