The release version 188.8.131.52 of cpanel seems to be having a bug for restoring backup accounts. It is only restoring the tar account . It failing to restore from a backup location ( extracted tar file ) . This will be updated in cPanel forum too https://forums.cpanel.net/f5/restorepkg-failing-feature-bug-402101.html
Steps to Recreate The issue :
1) Take the backup of user foo,
# /scripts/pkgacct foo
2) Extract it to /home
# cd /home # tar -xzf cpmove-foo.tar.gz # rm -f cpmove-foo.tar.gz
3) Now restore it using the following ,
# /scripts/restorepkg --force /home/cpmove-foo
It show the following errors ,
# /scripts/restorepkg --force --user /home/cpmove-foo Using pre-extracted cpmove file cPanel restorepkg 2 cPanel user: foo Force Mode: yes Reseller Privs Restore: yes Found /home/cpmove-foo ! cpmove- prefix is missing, but non prefixed directory exists.. the cpmove- prefix discarded. Extracting Domain....Done Sorry, we were unable to restore the account. Information about inhouse's primary domain is either missing or corrupt. For more information, please examine /home/cprestore/foo/cp/foo
So it is failing to restore from this path. Looks like only tar files are restoring .
We reported this bug to the cPanel and their support confirm it . So they assigned it to their internal department with case id #97497 . We hope the cPanel developers fix this issue soon.
This bug also affected the restore procedure of cPremote too with the full account restore option, because the cpremote use cpanel restorepkg feature itself for restoring the accounts. So you may please use the following workaround for restoring cpanel or cpremote backups.
1) make a tar file of your cpanel backup folder , let us say the account name is foo ,. then create a tar as follows,
# tar -cf foo.tar foo/
2) Upload this tar file to /home
3) Restore the backup using the following command,
# /scripts/restorepkg /home/cpmove-foo.tar
We will update again after getting a reply from the cPanel development team.