If you are allowed downtime, it is as simple and making the new database connect just like the old database, using the same database connection (just update the driver ahead of time). MariaDB slots in as a replacement for MySQL quite nicely. Switch to DNS names in the connection URL before old shutdown if you are going to change IP addresses--make that DNS name point at the new DB before new gateway startup/restore. So:
-
Switching to DNS name for DB connection and put in mutually compatible JDBC driver.
-
Make final old gateway backup and shut down.
-
Set up new database and move data, to same DB name in new server. Make identical auth in new server.
-
Shut down old database. Repoint DNS at new DB server.
-
Restore gateway backup into fresh v8.1 install, or upgrade in place, as appropriate.
That's it. The upgrade will "wake up" looking at all the history structure it expects, and will continue seamlessly from there.
{ You can minimize the downtime by setting up the new DB early to copy over all of the older history partitions while still running. Then you only need to copy the metadata tables and the latest partition tables during the final switchover. }