The restore failed because the username “xxxx” is invalid or not an existing cPanel user.

nyjimbo

Well-Known Member
Jan 25, 2003
1,134
1
168
New York
Customer calls up and says he totally screwed up his account by deleting stuff during FTP. Wants us to reload a backup. No problem we have backups. I check his remaining file structure and its all messed up so I delete the account via WHM. I then go to WHM -> Backups -> Restore Backup.

I pick the account name, select the date (there are several) add it to the queue and hit restore. I then get this (actual account name replaced with xxx) :

Could not restore account “xxxx”: Account failure: The restore failed because the username “xxxxx” is invalid or not an existing cPanel user.The “Account” restore module has the following areas disabled by request: “all”
ArchiveManager
Preparing archive for restoration …
ArchiveManager
The system successfully prepared the archive for restoration.
PreRestoreActions
Temporarily lifting quota for existing user to ensure that all data is transferred.
Using Universal Quota Support (quota=0)
PreRestoreActions
Account
Account
The restore failed because the username “xxxx” is invalid or not an existing cPanel user.
I try it with different dates, same result. I figure, ok, manually create account, cant do that because "account already exists" which it does not. Try to delete account and its not listed. No file structure exists for that account in "/home2"

Server is running CENTOS 6.5 x86_64 standard WHM 11.44.1 (build 17)

So where do I go from here ?
 
Last edited:

nyjimbo

Well-Known Member
Jan 25, 2003
1,134
1
168
New York
I opened a ticket on sunday. The tech noticed that it still existed even though it was not listed via whm. The solution was

grep -i username /etc/passwd
(it was in the passwd file)
username:x:856:855::/home2/username:/sbin/nologin​
You will want to run the following command:

userdel username​

Additionally, you will need to remove the following line from /etc/dbowners for the restore to complete:

grep -i username /etc/dbowners
username: username​

After doing the userdel AND deleting that user from /etc/dbowners I was able to do the full restore.
 
Last edited: