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:
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
- Backup Required: Ensure you have a complete backup before proceeding. Data loss is permanent if the rollback fails without a valid backup.
- See Backup Your Metric Insights Instance and Configure Backups with MI Console for details.
- Ensure you have access to https://get.metricinsights.com/ and download the needed Metric Insights version you are planning to roll back to.
- See Access Software Downloads and License Keys via Get MI for details.
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:
NOTE: Before deleting the databases, check the previously created backup for validity on the test environment, otherwise, all data may be lost.
- Launch
mysqlcontainer:
mi-control up -d mysql
- Enter
mysqlcontainer:
mi-mysql
- Log in to mysql:
mysql -uroot -p${MYSQL_ROOT_PASSWORD} -A
- Drop the
dashboardanddashboard_datasetdatabases:
drop database dashboard;
drop database dashboard_dataset;
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:
- Simple Install
- Orchestrated Deployments:
5. Check Rollback Status
- After an older version has been successfully installed, you should see the "successfully installed" message from the installer.
- 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.
- See Restore Your Metric Insights Instance for details.