Error migrating database

georgbhm
New Contributor III

Hello all,

I inherited a Jamf server running on CentOS, which I want to migrate to Ubuntu to fulfil system requirements.

However, while restoring the database on the new server it throws an error:

 

CREATE TABLE `os_update_process_manager_command_c ...
Error: Error 6125: Failed to add the foreign key constraint. Missing unique key for constraint 'fk_process_manager_uuid' in the referenced table 'os_update_process_manager'

 

I don't know how to handle that issue.
Any ideas?

1 REPLY 1

christy2951hern
New Contributor

Hello @georgbhm ,

The error occurs when trying to add a foreign key constraint named fk_process_manager_uuid to the table os_update_process_manager_command_c.
The error message states that there's no unique key present in the referenced table os_update_process_manager for the column uuid.

There's a high chance the os_update_process_manager table doesn't have a unique constraint on the uuid column. To fix this, you can directly execute an SQL query on the new Jamf Pro server.

ALTER TABLE `os_update_process_manager`
ADD CONSTRAINT UNIQUE (`uuid`);

 Important Note Back up your Jamf Pro database before running any SQL queries. This ensures you can revert to a previous state if something goes wrong. It's recommended to perform this on a test environment first to avoid impacting your production setup.