QMetry App DB Upgrade to MySQL v8.0.40 for 2 Tier RHEL8, RHEL9 & Podman

Pre-requisites
  • Ensure that QMetry is not in use and that there are no ongoing operations or traffic on the QMetry.

Steps to upgrade to MySQL v8.0.40 DB Container

Step 1. IMPORTANT: Backup your existing QMetry Database

Take the backup of your existing “qmetry” database. You can replace the username, password, and location of the backup file (currently default /opt).

podman exec qmetry_rds_1 sh -c 'exec mysqldump -uroot -p<password> --triggers --routines --hex-blob --single-transaction --lock-tables --no-create-db qmetry' > /opt/qmetry_backup_<date>.sql
Example 13. 
podman exec qmetry_rds_1 sh -c 'exec mysqldump -uroot -pqmetry --triggers --routines --hex-blob --single-transaction --lock-tables --no-create-db qmetry' > /opt/qmetry_backup_2021-01-01.sql


Verify that your database has been backed up properly and is available for later use in case of any emergency.

Step 2. Stop the QMetryapplication

Go to the QMetry application server and execute the following commands:

systemctl stop qmetryapp

Step 3. Extract QMetryDBUpgrade.zip.

Copy the QMetryDBUpgrade.zip file received from QMetry Support to the server where the QMetry DB container is located. Navigate to the directory where this file is kept and execute the following command.

unzip QMetryDBUpgrade.zip

The following process will create a backup of the data from the MySQL 5.7.28 container. Next, a new container for the database will be set up, running on MySQL v8.0.40. Finally, the backed-up data will be restored into the new MySQL v8.0.40 container.

Step 4. Execute the following commands.

cd QMetryDBUpgrade
sudo su
chmod +x upgradedb.sh
sh upgradedb.sh

Next, the installation process will prompt you with the following questions.

Options

Default Value

Description

Do you have QMetry's application container running on this machine? (Y/N)

Y

Mention “Y”.

Enter the name of the QMetry application's container.

qmetry_app_1

Enter the QMetry application container name.

Do you have QMetry's database container running on this machine? (Y/N)

Y

Mention “Y”.

Enter the name of QMetry's database container

qmetry_rds_1

Enter the QMetry Database container name.

Note

This process may take time depending on the amount of data in the database.

Steps to upgrade QMetry to the latest version

Follow the document QMetry Upgrade Guide for RHEL8, RHEL9 and Podman (from QMetry v8.16.0.1 and above) to upgrade to the latest version.

Clean up data from the MySQL 5.7.28 container

Refer to this section only after performing the steps mentioned in the Steps to upgrade to MySQL v8.0.40 DB Container and Steps to upgrade QMetry to the latest version sections above.

This is an optional step to perform, but we recommend you follow it in order to clean up the residual components and, hence, free up some disk space on the server.

Note

The old QMetry database container and all associated data will be permanently removed once you perform these clean up steps. This action is irreversible.

Before you begin, ensure that the QMetry upgrade is successful, and the data has been fully restored. Once everything has started functioning properly, only then proceed with these steps.

Cleanup Commands:

Execute the following commands on the server where the QMetry DB container is located.

podman rm qmetry_rds_1
podman volume rm $(podman volume ls -qf dangling=true)
podman image prune -af

If you encounter any issues during the migration process, please generate a support ticket on the Support Portal for assistance.

Note

If you are upgrading the QMetry app to the latest version, it is essential to update the Automation API to the latest version. Refer to Install/Upgrade Automation API Feature (RHEL8, RHEL9 & Podman).

Publication date: