QMetry App DB Upgrade to MySQL v8.4.8 for 2 Tier Linux
Pre-requisite
Ensure that QMetry is not in use and there are no ongoing operations or traffic on QMetry.
Steps to upgrade to MySQL v8.4.8 DB Container
In case of Offline Installation
Follow the steps to download and restore the QMetry Database image. After the image is successfully restored, you can then move forward with the next steps.
Initial Steps to follow for Offline Installation
Download the Container Image of QMetry DB
Follow these steps on a machine where the internet is accessible so that the container images can be downloaded on it.
Steps to download the container image of the QMetry Database:
Execute the following command. Next, it will ask for container repository credentials. Enter the required credentials. If you do not have the credentials, please contact QMetry Support.
docker login
After entering the container repository credentials, it will show the success message as shown below.

Execute the following commands to download and save the QMetry Database container image.
docker pull qmetry/qmetry:appdb848 docker images docker save -o qmetrydb.tar qmetry/qmetry:appdb848 ls

Transfer the qmetrydb.tar file to the host server.
Restore the Container Image of QMetry DB
Restore the container image of QMetry DB on the specific machine where the installation is to be carried out.
Steps to restore the container image of the QMetry Database:
If you are using the "root" user for installation, then execute the following command. If the user is other than the "root" user, skip this step.
sudo su
Navigate to the directory where the qmetrydb.tar file is placed. Then execute the following command.
docker load -i qmetrydb.tar
Execute the following command to check whether the container images have been restored correctly or not.
docker images

Steps to Upgrade QMetry App DB to MySQL 8.4.8
To upgrade QMetry App DB, do the following:
Important: Backup your existing QMetry Database.
docker 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 14.docker 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.
Copy the
QMetry_Linux_Installer.zipfile to the server where the QMetry DB container is located. Navigate to the directory where this file is kept and run the following command.unzip QMetry_Linux_Installer.zip
This process backs up data from the MySQL 8.0.33 container, creates a new MySQL 8.4.8 container, and restores the backup into it.
Run the script.
cd QMetry_Linux_Installer sudo su chmod +x upgrade.sh sh upgrade.sh
At the online upgrade menu, type 1 to upgrade App DB.

Next, the installation process prompts 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” for 2-tier upgrade.
Enter the name of QMetry's database 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” for 2-tier upgrade.
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 Document (to the latest version) 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.4.8 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.
docker rm qmetry_rds_1 docker volume rm $(docker volume ls -qf dangling=true) docker image prune -af
If you encounter any issues during the migration process, please generate a support ticket on the Support Portal for assistance.