Monthly Archives: June 2011

Migrating cPanel Accounts without homedir – The SSH Way

Step 1: Generate backups without the homedir and sync them one by one removing each backup after the transfer

for x in `\ls -A1 /var/cpanel/users/`; do /scripts/pkgacct --skiphomedir ${x} ; rsync -aP /home/cpmove-${x}.tar.gz -e ssh [email protected]:/home/ ; rm -f /home/cpmove-${x}.tar.gz ; done

Step 2: Restore all accounts on the new server

for x in `ls -A1 /home/cpmove*` ; do /scripts/restorepkg /home/${x} ; done

Step 3: Sync /home from old server to new server

 rsync -aP /home/ -e ssh [email protected]:/home/