Server migration problems

Rick C

Member
Aug 19, 2007
8
0
51
Hi there

I have been having problems using 'Copy multiple accounts/packages from another server'
it kept saying failed. So i created an account on the new server and set it up as an ftp back up on the old server. All the tar.gz files are on the new server. I used the MV command to move them to the home dir.
But now when i go to 'Restore a Full Backup/cpmove file' you can only do them 1 at a time and i have 300 accounts. Does anyone know a quicker way of doing this?

Kind regards,
Rick
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
You could create a shell script that loops through all the .tar.gz archives and runs /scripts/unpkgacct on them.

For documentation on how to use /scripts/unpkgacct, simply execute /scripts/unpkgacct via SSH as root with no parameters.
 

Rick C

Member
Aug 19, 2007
8
0
51
i ran

cd /home for i in `ls -A *.gz`; do echo "/scripts/restorepkg `echo $i|cut -d . -f 1`";done


then ran the output

winner :)