Tag History Migration Best Practices? Upgrading to new servers!

In the middle of a shutdown and was wondering if any of you had any tips for migrating to a new database on a separate server than the gateway. My greatest concern is keeping the Tag History intact.

Plan is to upgrade from 7.9.10 to 8.1.x. Currently our database (MySQL) is on the primary gateway. We have a lot of tag history that is getting stored to a database/schema called 'ignition' in MySQL. It's fairly straightforward.

We've be given the opportunity to have a separate database server and want to try moving to MariaDB, specifically looking at their current long term support offering (10.11.4).

What are the primary tricks that will keep tag history happy through the move? I've read several posts that say contacting Tech Support is necessary, but I've got to believe that there's some layer in the configuration, if kept intact, will keep the tag historian from doing something like retiring the existing tags and starting over. I've also seen some similar posts on here that received no replies, which worries me.

We have freedom over server naming, db connection naming, database/schema naming, etc. I've completed a first attempt at a migration of the database and data to the new server ... the schema/database names are the same under the new MariaDB instance, the only things different in my mind are the server name (which should only exist in the driver jdbc url) and the underlying database driver jar.

I've contemplated trying the following to keep the new gateway as clean as possible with hopes of keeping unneeded database drivers from being migrated:

Old server:

  • disable tag history provider(s)
  • remove database connections associated with providers (since I don't need one with a MySQL driver migrated to new gateway)
  • backup the gateway

New server:

  • restore the gateway (I usually restore with everything disabled)
  • re-create new database connections with the same names (only the MariaDB driver and jdbc url changes)
  • enable tag provider and tag history

We have time to try a scenario or two and am just hoping to get some advice on the maximizing my chances.

I've done some cursory searches in the Knowledge Base, Forum and through the Manual, but haven't found a comprehensive best practice for this. If there's something already out there, I'd be very appreciative for a link.


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. }

Thanks! I will follow your advice as closely as I can on my first attempt.

My general uneasiness comes from wanting to use the native MariaDB driver jar, which I think means I have to create a brand new Database Connection.

I was hoping I could just change the driver under the existing connection, but per the docs:
"The JDBC driver dictates the type of database that this connection can connect to. It cannot be changed once created."

I'm hoping that when Ignition wakes up, it only cares about the name of the db connection and not some underlying UUID or other identifier.

Just as a follow up. All went well with the migration. It even survived me being a little more "busybody" than I might should have been.

On the 7.9, I disabled the History Datasource Providers for the database connections I was migrating. Then I deleted the related Database Connections since I didn't want the MySQL driver connections to be loaded back in when we restored into the 8.1 install.

We restored the 7.9 backup into the 8.1 install with everything disabled.

After the restore, I created the new database connections using the MariaDB connector driver and used the same names for the connections as as on the 7.9 system.

I was worried during all this, because even though we had restored disabled, the wrapper log kept saying it was doing "history" stuff in the background.

However, when we finally got around to re-enabling all the connections, our trends were able to pull in the old process data just fine.

The actual migration of the MySQL data into the new MariaDB instance was much more tedious than the Ignition side of things, so I'm thankful the Ignition side worked as expected.