Tricia Help
Last edited Feb 14

Migrating from HSQL to MySQL

If you install Tricia using the default configuration, your installation uses the in-memory database HSQLDB. This database is fine for testing purposes but should be replaced for a production system by a dedicated relational database, e.g., MySQL. This page describes the steps necessary to migrate the content between both databases.

1. Preparations

  1. As a first prerequisite, make sure you installed MySQL on your machine and created a database for Tricia.
  2. For safety reasons, you should create a backup copy of your HSQLDB. This is dony by creating a copy of the folder %TRICIA_DIRECTORY%/data/hsqldb.
  3. Stop your Tricia installation.

2. Configuring the ParallelStore

The actual copying of the content is done by configuring your installation with a special store instance called ParallelStore, which copies the content from one store to the other. 

An example store configuration looks like this:

...
store = de.infoasset.platform.store.ParallelStore
store.primaryStore = de.infoasset.platform.store.hsqldb.HsqldbServerModeStore
store.secondaryStore = de.infoasset.platform.store.mysql.MySqlStore
store.secondaryStore.user = root
store.secondaryStore.password =
store.secondaryStore.database = tricia
...

Copying the data

Now you have to start Tricia. It will copy all the data and finish afterwards.

Configure MySQL

Now you have to remove the ParallelStore from your configuration, and configure a store using MySql (see Configuring Tricia).