diff --git a/docs/modules/deploy-manage/pages/h2-upgrade.adoc b/docs/modules/deploy-manage/pages/h2-upgrade.adoc new file mode 100644 index 00000000..8ab49343 --- /dev/null +++ b/docs/modules/deploy-manage/pages/h2-upgrade.adoc @@ -0,0 +1,19 @@ += H2 upgrade +:description: Management Center uses H2 database to store metadata, including connected clusters, security provider config, and client filtering configs. As H2 version 1.x is no longer maintained, some security scanners report vulnerabilities for this version. Although not affected by these vulnerabilities, Management Center has been updated to use H2 2.x, which also includes a number of fixes and improvements. However, as metadata from the H2 1.x is not binary compatible with version 2.x , data migration is required. + +{description} + +== Seamless H2 data migration + +From 5.4.0, an additional `h2-upgrade-cli-*.jar` is included, which is impicitly invoked during Management Center startup during the `./bin/hz-mc start` command. This means that no further action is required if you use bundled `hz-mc` tool or `hazelcast/management-center` docker image to start Management Center and H2 data is automatically backed up and migrated. + +== H2 data migration + +If you use custom scripts to run Management Center and they don't call `./bin/hz-mc start`, you must upgrade and migrate H2 data manually. + +The new `hz-mc upgrade-h2` command runs all migrations for you and migrates data from `${MC_HOME}/sql` to `${MC_HOME}/metadata`. During migration, some additional folders are created for troubleshooting purposes; these include `sql.backup` and `sql.migrated.${timestamp}`. These additional folders can be safely deleted after successful migration. +If you have customized the Management Center home directory, ensure that the `MC_HOME` environment variable has been configured before calling `hz-mc upgrade-h2` +For example: +```bash +MC_HOME=/opt/mc ./bin/hz-mc upgrade-h2 +```