Migrate existing multi-user data to anothher server

Post Reply
JD12
Posts: 11
Joined: 16 Oct 2009, 11:54

Good day,

I am writing documentation for our new installation of Essential Project and I am trying to anticipate the correct procedure for migrating existing data (stored in MySQL) to both a new Protege server and MySQL server in the future.

My confusion stems from the process in which the database tables are created in the first place, by "converting" a pprj file to a Protege database. Since the metaproject is setup to still point to the pprj files, even though the data is stored on a MySQL server, I can only assume that the MySQL server details are stored somewhere in this file. If I move all of the pprj files to a different server and the database is also migrated to a different server, how can I modify the pprj files to reflect the new server location, database and table names, login credentials, etc?

Logically I would assume that if I just try to "convert" the pprj files again to the new server that the data from the old server would be lost. Am I correct in assuming this or will this in fact work (i.e. the data is also stored in the pprj files)?

Thanks for any light you can shed on this.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Apologies for the delay in getting back to you.

The PPRJ file is the project file that defines everything about how the project is configured and stored. When you convert a file-based repository to use a database "backend", the configuration of the classes (the meta model) and the instances (the model) are stored in a database but the PPRJ remains as a file.
You are correct in that it is the PPRJ file that contains the JDBC connection details for the database.

Hosting the database and Protege servers on the same physical server makes things easier when it comes to moving to another server as you can simply use "localhost" for the hostname and keep all the other parameters the same. This means that you can then perform a database restore on your target database, using a backup of the source database as the restore script.

However, if you host the database on a separate server, for example, or you need to move to an alternative database platform, you are correct in that the PPRJ file contents need to be updated. To update this file, open that file in Protege in stand-alone mode. To do this:
  • Stop your Protege server if it is running
  • On the server, start Protege Client and open the PPRJ file.
We need to re-convert the Project format to the new target database. This target database must be active and running and the required username and password for Protege must be available. Protege will then create the table and move the contents of the repository into the new database.

It is theoretically possible to update the contents of the PPRJ file directly, e.g. with a text editor, but I wouldn't recommend this as the conversion process is what creates and populates the new database for you. You could use a backup of the original database, restore it into the new database server and then update the PPRJ but the conversion approach is probably simpler and safer.

When this is complete, the PPRJ contents will have been updated. Save As this to a new PPRJ filename (to preserve your original working project). This new PPRJ now holds the configuration for using the new database. Add an entry for this in your metaproject to make it available. Again, give this new project a new name so that it is not confused with your original, working project.

Then restart your Protege Server.

Hopefully this gives you what you need and a bit more insight into how Protege works with databases.
Let me know if you need anything more

Jonathan
Essential Project Team
Post Reply