Skip to content

Commit

Permalink
H2 upgrade docs (#297)
Browse files Browse the repository at this point in the history
Co-authored-by: rebekah-lawrence <[email protected]>
  • Loading branch information
zhmaeff and rebekah-lawrence authored Feb 12, 2024
1 parent bea9de9 commit a460dec
Showing 1 changed file with 19 additions and 0 deletions.
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
```

0 comments on commit a460dec

Please sign in to comment.