- Plesk 11.x for Windows
- Plesk 10.x for Windows
- Plesk 12.0 for Windows
Backup fails with an error:
CONFIG_TEXT: <?xml version="1.0" encoding="utf-8"?>
<object name="server" type="server">
<message severity="error" code="keynotfoundexception">
<description>the given key was not present in the dictionary.</description>
This makes migration from the server impossible, as on destination server Plesk Migration & Transfer Manager will fail to deploy agent:
PLESK_ERROR: ERROR: Unable to initialize agent on remote host.
The given key was not present in the dictionary
The issue might be caused by the inconsistency in Plesk database.
To troubleshoot the problem, connect to the server via SSH and execute the following command and query:
C:\> "%plesk_bin%\\dbclient.exe" --direct-sql --sql="select domains.id, domains.name, clients.login from domains left join clients on clients.id=domains.cl_id where clients.login is NULL"
If an empty output is returned, then this article does not apply to your case.
If any domain names are returned, it means that they belong to a non-existing client.
Back up the database:
C:\> "%plesk_dir%\\MySQL\\bin\\mysqldump.exe" -P8306 -uadmin -pPleskAdminPassword --databases psa > c:\\Users\\Administrator\\plesk_db_backup.sql
Set correct 'cl_id' for the domain entry (replace N in the request with ID of domain found on Diagnostics step and admin with login of proper owner of the domain):
C:\> "%plesk_bin%"\\dbclient.exe --direct-sql --sql="update domains set cl_id = (select id from clients where login = 'admin') where id = N" `