Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2 upgrade docs #297

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/modules/deploy-manage/pages/h2-upgrade.adoc
Original file line number Diff line number Diff line change
@@ -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
```
Loading