Downgrading to Older Metric Insights Versions

This article explains how to roll back Metric Insights to an older version. This procedure is typically used after a failed upgrade or when immediate reversion is necessary. The whole process looks as follows: clean up the environment, install an older version of Metric Insights, run restore from a backup.

NOTES:

  • If you do not have a backup, you can still perform a rollback to an older version, however, all data will be lost.
  • Metric Insights recommends testing any version rollback in a non-production environment whenever possible.

Table of contents:

  1. Check List Before Downgrading
  2. Turn Off Application
  3. Check MySQL Version Compatibility with Metric Insights
    1. MySQL Version Is Supported By Metric Insights
    2. MySQL Version Is Not Supported By Metric Insights
  4. Launch Installer
  5. Check Rollback Status
  6. Restore from Backup

NOTE: Installing an older version of Metric Insights over newer version is NOT allowed. It is not possible because the database schema will not be automatically rolled back to the older version, supported by the older MI version. Instead, follow the procedure described in this article.

1. Check List Before Downgrading

  1. Backup Required: Ensure you have a complete backup before proceeding. Data loss is permanent if the rollback fails without a valid backup.
  2. Ensure you have access to https://get.metricinsights.com/ and download the needed Metric Insights version you are planning to roll back to.

2. Turn Off Application

mi-control stop

3. Check MySQL Version Compatibility with Metric Insights

Check whether your current MySQL version is supported by the Metric Insights version you are downgrading to.

Proceed with the corresponding section:

Expand or collapse content MySQL Version Is Supported By Metric Insights

NOTE: Before deleting the databases, check the previously created backup for validity on the test environment, otherwise, all data may be lost.

  1. Launch mysql container:
mi-control up -d mysql
  1. Enter mysql container:
mi-mysql
  1. Log in to mysql:
mysql -uroot -p${MYSQL_ROOT_PASSWORD} -A
  1. Drop the dashboard and dashboard_dataset databases:
drop database dashboard;
drop database dashboard_dataset;
Expand or collapse content MySQL Version Is Not Supported By Metric Insights

Simple Install with MySQL on Localhost

Clean up the /opt/mi/data/mysql directory:

rm -rf /opt/mi/data/mysql

Deployments with Remote Database Services

4. Launch Installer

See instructions on running the installer based on your Metric Insights deployment type:

5. Check Rollback Status

  1. After an older version has been successfully installed, you should see the "successfully installed" message from the installer.
  1. Open the application from the browser, if the login page is displayed, you can proceed with a restore from the backup.

6. Restore from Backup

Run restore from the previously created backup.