Is there a reason you did not try the option Michael indicated:
WHM >> Backup >> Restore Multiple Backups
This would have allowed you to restore multiple backups rather than individually. The option you selected of "Restore a Full Backup/cpmove file" is not the same one he had noted.
As for command line, you could do the following to restore multiple backups there.
1. Create a list of all the usernames that are being restored called /root/acctlist. You could create this script by going to the old machine and doing this command:
Code:
cat /etc/trueuserdomains | cut -d: -d' ' -f2- > /root/acctlist
This will create a file on the old machine /root/acctlist that you can copy to the new machine.
2. On the new machine, you could then issue these commands after the new machine has /root/acctlist on it:
Code:
screen
for i in `cat /root/acctlist` ;do /scripts/restorepkg $i ;done
I have the command running in screen in case your SSH connection gets shut down somehow, since the screen session isn't dependent on your specific terminal working.
If you don't have screen installed onto the new machine, you can install it using: