Symptoms
When attempting to restore an account from a backup or cpmove file, you receive an error similar to the following.
The “Account” restore module failed because of an error: Failed to create the account: A database owner with the name “username” already exists in the database map (/var/cpanel/databases/username.*). at /usr/local/cpanel/Whostmgr/Accounts/Create.pm line 1371.
Description
The issue occurs when the user's database map file exists without other related configuration data, which commonly occurs due to file system errors or partial account removals.
Workaround
The user's /var/cpanel/databases/$username.json
file must be moved aside.
mv -v /var/cpanel/databases/$username.json{,.$(date +%s)}
Please note that "$username" must be replaced with the cPanel user's username.
Since the issue commonly occurs due to partial account removal, the user's database users and databases may also need to be removed from MySQL/MariaDB.
Additional resources
How to locate 'cruft' left over from a partially removed account
Comments
0 comments
Article is closed for comments.