Migration to Native PostgreSQL Repository

Last modified 11 Oct 2021 14:03 +02:00
Since 4.4
This functionality is available since version 4.4.

Overview

Since changes in schema are too large to be handled by SQL update, or you may be switch to PostgreSQL database, you must export and reimport all your data.

In short the migration process should be:

  1. Upgrading midPoint to 4.4 using your original SQL configuration

  2. Exporting your existing data to file system using Ninja

  3. Initializing Native PostgreSQL repository

  4. Changing midPoint configuration to use native PostgreSQL Repository

  5. Importing your existing data to native PostgreSQL Repository using Ninja

  6. Starting midPoint with new configuration

Exporting your existing data to file

We need to export existing data in raw mode, so they can be later reimported into new native PostgreSQL repository using same tool (ninja).

In terminal, go to your midPoint installation directory and execute:

bin/ninja.sh -v export -r -O export.xml
See ninja for more export configuration options and their meaning

Initializing & changing configuration for native PostgreSQL repository

See Native PostgreSQL Repository for installation and configuration of native PostgreSQL repository.

Please backup your config.xml, you may need it later, if you will need to revert changes in order to fix some problems.
Do not start midPoint after configuration changes performed in usage documentation.

Importing your existing data to repository

Once export is successful and configuration changes were made, we may proceed with importing data to new native PostgreSQL repository.

In terminal, navigate to your midPoint installation directory and execute:

bin/ninja.sh -v import -i export.xml
See ninja for more import configuration options and their meaning

4. Starting midPoint

If import was successful, you are now able to start midPoint using new repository.