Migration from BPC 4.0 to BPC 4.1

This page describes how to migrate an existing BPC 4.0 installation to BPC 4.1.

If you are planning to migrate from BPC 3.*, please carry out Migration from BPC 3.* to BPC 4.1 first.

Initial situation

You have installed BPC 4.0 and it is running.

The INSTALLATIONSVERZEICHNIS looks something like this:

Diagram

Backup

The existing installation will not be changed during the migration, but it is recommended to create a backup of the existing installation.

Preparation

Install the BPC 4.1 as described in Installation without changing existing symlinks and without starting the newly installed components (OpenSearch and Karaf).

The INSTALLATIONSVERZEICHNIS looks something like this:

Diagram

Migration

The migration is about transferring the existing data (including the configuration) from Elasticsearch to OpenSearch.

Proceed as follows:

  1. Stop Karaf (Elasticsearch must continue to run)

    e.g. via karaf/bin/stop

  2. Create a snapshot of all indices in Elasticsearch:

    • Unix systems

    • Windows systems

    curl -X PUT 'localhost:9200/_snapshot/bpc_backup/migration?wait_for_completion=true'
    curl -X PUT "localhost:9200/_snapshot/bpc_backup/migration?wait_for_completion=true"

    Sie können an dieser Stelle auch eine Auswahl von Indices definieren. Für die genaue Syntax und alle Optionen siehe https://www.elastic.co/guide/en/elasticsearch/reference/7.10/snapshots-take-snapshot.html. Sie müssen mindestens den Index bpc-configuration mit aufnehmen.

  3. Stop Elasticsearch

  4. Start OpenSearch

  5. Create a backup repository

    • Unix systems

    • Windows systems

    curl -X PUT -H 'Content-Type: application/json' -k -u admin:admin 'https://localhost:9200/_snapshot/bpc_backup' -d '{ "type": "fs", "settings": { "location": "bpc_backup" } }'
    curl -X PUT -H "Content-Type: application/json" -k -u admin:admin "https://localhost:9200/_snapshot/bpc_backup" -d "{ ""type"": ""fs"", ""settings"": { ""location"": ""bpc_backup"" } }"
  6. Stop OpenSearch

  7. Copy backup from Elasticsearch to OpenSearch

    Copy directory INSTALLATIONSVERZEICHNIS/elasticsearch/data/bpc_backup to INSTALLATIONSVERZEICHNIS/opensearch_data/bpc_backup

  8. Start OpenSearch

  9. Load backups

    • Unix systems

    • Windows systems

    curl -X POST -H "Content-Type: application/json" -k -u admin:admin 'https://localhost:9200/_snapshot/bpc_backup/migration/_restore' -d '{ "indices": "*,-.opendistro_security", "include_global_state": false }'
    curl -X POST -H "Content-Type: application/json" -k -u admin:admin "https://localhost:9200/_snapshot/bpc_backup/migration/_restore" -d "{ ""indices"": ""*,-.opendistro_security"", ""include_global_state"": false }"
  10. Delete snapshot no longer needed

    • Unix systems

    • Windows systems

    curl -X DELETE -k -u admin:admin 'https://localhost:9200/_snapshot/bpc_backup/migration'
    curl -X DELETE -k -u admin:admin "https://localhost:9200/_snapshot/bpc_backup/migration"

Follow-up

  1. The symlinks _jvm and karaf should now be adapted to the new directories.

    BPC 4.1 is still compatible with Java 11. However, support for Java 11 will expire in 2023. A switch to Java 17 is recommended.

    When used together with INUBIT, the Java delivered with INUBIT can still be used.

  2. The existing BPC license must be copied to the INSTALLATIONSVERZEICHNIS/karaf/deploy directory.

  3. Required Database drivers must be installed.

  4. The new Karaf and OpenSearch (if not already done) can now be started.

Please note that the old BPC installation is no longer started automatically (e.g. via systemd).

The INSTALLATIONSVERZEICHNIS looks something like this:

Diagram

The old installation can now be deleted if required.


Keywords: