Migration from InfluxDB® to PostgreSQL®

Set the PostgreSQL® to Read&Write Database

  • Open the NGA Database Engineering via System Management > Database > Database Engineering and set the PostgreSQL® to Read&Write database:
    Figure 1. Set the PostgreSQL® to Read&Write database

Group settings - changing the backend, creating new groups

  • Open the NGA Runtime Engineering via System Management > Database > Runtime Engineering and switch the backend from InfluxDB® to PostgreSQL® for the existing groups that archive to InfluxDB®. This means at least the groups EVENT and ALERT or more groups if you use several groups:
    Figure 2. Switch the backend to PostgreSQL®
  • Open the NGA Database Engineering via System Management > Database > Database Engineering and change your InfluxDB® backend to be a read-only backend:
    Figure 3. Set the InfluxDB® backend to read-only
  • For each archive group that you have changed to PostgreSQL®, add an archive group with the same settings for Alerts and Storage settings. Select InfluxDB® as the Backend setting and click Save.

    Then set the Group Name in DB of the newly created auxiliary group to match the Group Name in DB of the corresponding original group and click Save again.

    For the alert group, check the check box for Alerts in the group settings:
    Figure 4. Check the Alerts checkbox

    Below, the name EVENT of the original EVENT group is used for the new group:

    Figure 5. Set the Group Name in DB

Importer settings - Create a new importer, set the read-only InfluxDB® backend for the importer

  • Open the NGA Importer configuration via System Management > Database > NGA Importer and click on the plus sign under the Importer table on the left-hand side of the window. Enter a name and select NextGenArchiver for the Type of reader:
    Figure 6. Add a new importer
  • Select the InfluxDB® backend for the new importer you created by selecting the importer from the table, clicking on the backendDpName in the Importer-specific configuration and by selecting the _NGA_B_InfluxDB datapoint:
    Figure 7. Select the read-only backend

Select the start time for the import and start the import

  • Open the NGA Importer via System Management > Database > NGA Importer and check the Import from checkbox and select the start time for the data import.
    Note:
    The time must be the time of the oldest segment in the InfluxDB®. To check the oldest segment, open the NGA Runtime Engineering via System Management > Database > Runtime Engineering and the Segment tab. On the right you can see the segments and check the oldest segment:
    Figure 8. Check the oldest segment
  • Start the import via the NGA Importer.