Plesk

Backup in Plesk is created with warning: Unable to back up database. Error: Unable to find row with id in data_bases table.

Symptoms

Cause

Database inconsistency. An application has been removed from a subscription, but records related to this application were left over in the apsc and/or psa database.

select * from apsResources where pleskId=25;
+----+--------------------------------------+------------+---------+
| id | registryId | pleskType | pleskId |
+----+--------------------------------------+------------+---------+
| 11 | ebf59913-084f-4321-b816-279307946427 | db | 25 |
| 12 | ebf59913-084f-4321-b816-279307946427 | db-user | 25 |

MariaDB [apsc]> select aps_registry_object.uid from aps_registry_object join aps_application on aps_application.registry_object_id=aps_registry_object.id where aps_application.id=(select aps_resource.app_id from aps_resource join aps_resource_adjacency_list on aps_resource.id=aps_resource_adjacency_list.dependent_resource_id where aps_resource_adjacency_list.base_resource_id=(select aps_resource_adjacency_list.base_resource_id from aps_resource_adjacency_list join aps_resource on aps_resource.id=aps_resource_adjacency_list.base_resource_id join aps_registry_object on aps_resource.registry_object_id=aps_registry_object.id where aps_registry_object.uid='ebf59913-084f-4321-b816-279307946427'));
+--------------------------------------+
| uid |
+--------------------------------------+
| 7c05f8de-a84a-44f9-b616-2efca1143908 |
+--------------------------------------+
1 row in set (0.003 sec)

MariaDB [psa]> select * from apsResources where registryId='7c05f8de-a84a-44f9-b616-2efca1143908';
Empty set (0.001 sec)

Note: there can be empty output in the query above or some records with this registryId may be present in the psa database.

Resolution

  1. Connect to the server via SSH.

  2. Execute the command below to fix inconsistencies:

    # plesk repair db

Exit mobile version