Knowledge BaseMetric InsightsSystemUpgradesUpgrading in-place Metric Insights from v5.6.x to v6.2.x

Upgrading in-place Metric Insights from v5.6.x to v6.2.x

This article covers in detail how to upgrade in-place Metric Insights from v5.6.x to v6.2.x. This is for non-orchestrated environments of Metric Insights that will run v6 (also known as a Simple Install). To ensure the current v5 server is compatible with v6, please see the following help documentation:

For information on upgrading Metric Insights v6.x, refer to:

1. Create a backup of Metric Insights v5

 Create backup on MI v 5.6.x and move it out of the /var/backups/mi-app-backups folder because this folder will be purged

$ mi-app-backup -vv
$ mv /var/backups/mi-app-backups/<your-v5-backup.tar.gz> /home/myuser

Move or copy any critical files out of the /opt/mi filesystem to ensure a backup copy exists after the uninstall. Place the files or copies in your home directory or in any directory other than /opt/mi. Here's an example of moving the files to /home/myuser/MIv5/

$ mv /opt/mi/iv/engine/config/saml.php /home/myuser/MIv5/
$ cp -Rf /opt/mi/iv/data/themes/* /home/myuser/MIv5/
$ cp -Rf /opt/mi/ssl/* /home/myuser/MIv5/

2. Stop Apache and MySQL services (if MySQL is running locally)

Stop and disable Apache and MySQL services. Note the service names can differ depending on what flavor of Linux the server is running:

  • Debian/Ubuntu:  apache2,  MySQL/mariadb
  • RedHat/CentOS:  httpd,  MySQLd/mariadb
$ systemctl stop mariadb
$ systemctl disable mariadb 
$ systemctl stop httpd
$ systemctl disable httpd

Check ports 80/443/3306 to ensure no lingering Apache and MySQL processes are occupying the ports

netstat -tulpn 

3. Download the Metric Insights v5.6.3 installer and unpack

Contact Metric Insights Support for the v5.6.3 installer. Once you receive the download link, download the install package and copy it to the MI server.

Untar the MI v5.6.3 install package by running the following tar command:

$ tar xvf MetricInsights-Installer-v5.6.3-Full.tar.gz

Move to the v5.6.3 install directory:

$ cd MetricInsights-Installer-v5.6.3-Full

4. Run the uninstaller script to remove v5 from the server

Use the uninstaller.py script to uninstall MI v5.6.x

$ ./uninstaller.py --purge -vv

5. Download the latest Metric Insights v6 installer and unpack

Contact Metric Insights Support for the latest v6 installer. Once you receive the download link, download the install package and copy it to the MI server.

Untar the MI v6 install package by running the following tar command:

$ tar xvf MetricInsights-Installer-v6.2.1-Full.tar.gz

Move to the v6.2.1 install directory:

$ cd MetricInsights-Installer-v6.2.1-Full

6. Run the installer to deploy v6

Before running the installer, confirm whether the MySQL database will run locally, or from a remote database server. Please also identify what timezone the Metric Insights application should be in. Note the timezone values to use below.

If MySQL will locally on the same server, run the installer as follows:

$ sudo ./installer.py --bind-address 0.0.0.0 --timezone <timezone> -vv

If MySQL will run from a remote database server, run the installer as shown below. Note, MySQL 8 must already be installed on the remote db server:

  • If remote database server has the same timezone as MI app:
$ sudo ./installer.py --timezone <MI app timezone> --bind-address 0.0.0.0
--dp-hostname dataprocessor --seed-hostname seed --db-hostname <remote DB host>
--db-user <remote DB root username> --db-password <remote DB root password>
--components web,data-analyzer,dataprocessor,seed,monitoring -vv
  • If remote database server has a different timezone than MI app:

Prior to MI v6.2.5:

$ sudo ./installer.py -v --components web,dataprocessor,seed 
--db-hostname <remote DB host> --db-user <remote DB root 
username> --db-password <remote DB root user password> 
--timezone <MI app timezone> --dp-mysql-option 
'&serverTimezone=<DB server timezone>' --bind-address 0.0.0.0 
--dp-options '\-Duser.timezone=<MI app timezone>'

MI v6.2.5+:

$ sudo ./installer.py --bind-address 0.0.0.0 --db-hostname 
<remote DB host> --db-user <remote DB root username> 
--db-password <remote DB root password> --timezone 
<timezone> --mysql-timezone <MySQL timezone> 
--components web,data-analyzer,dataprocessor,seed,monitoring -vv

7. Restore the v5 backup in v6

Restore your MI v5.6.x backup in MI v6. The backup file can be restored directly from the host server. There is no need to enter the v6 docker containers.

$ mi-app-restore /home/myuser/<your-v5-backup.tar.gz> --convert --skip-compatibility-check --force -vv

For more information about Metric Insights v6, please see the following articles: