Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to transfer all cpanel accounts  (Read 2289 times)

0 Members and 1 Guest are viewing this topic.

vinayakk

  • Guest
How to transfer all cpanel accounts
« on: February 01, 2014, 05:55:27 pm »
Transfer all  cpanel accounts using shell.

First we need to create all accounts backup on your current server, execute following command

Code: [Select]
cat /var/cpanel/users | while read line; do
/scripts/pkgacct $line
done

All accounts are backuped up under /home, now transfer all accounts backup to your new server using SCP command line.

Code: [Select]
scp cpmove-* root@new-server-ip:/home

To restore all accounts, put all the users in the file named users on the new server /home

Code: [Select]
cat /home/users | while read line; do
/scripts/restorepkg $line
done

 :)