Upgrade to MariaDB 10.11
Prerequisites Copied
Before performing the upgrade, ensure the following prerequisites are met:
- Your Opsview version is fully upgraded to 6.11.1 or newer. Older versions do not support MariaDB 10.11 as the default database.
- Your database is running MariaDB. Switching between database vendors (for example, from MySQL to MariaDB or vice versa) is not supported for existing local, remote, or RDS databases.
- Your operating system is compatible with MariaDB 10.11. For more information, see Supported databases.
Back up Opsview databases and configuration Copied
Warning
This step is crucial to prevent data loss in your Opsview system.
To backup your Opsview data and system, refer to Back up your Opsview data and system for instructions on backing up all databases on the server. If you are using a remote database server, perform the backup on your database host. Otherwise, perform the backup on the orchestrator.
If you are using a RHEL or OL system and your MariaDB packages come from the MariaDB repository instead of the OS repository, you must perform additional steps before upgrading to MariaDB 10.11. This is due to the upgrade process switching the package source to the OS repository. For detailed instructions, see Disable the MariaDB repository and remove its packages.
Upgrade to MariaDB 10.11 Copied
On your orchestrator, do the following steps:
- Add the following configuration to the
user_vars.yml
file.
opsview_database_package_vendor: 'mariadb'
opsview_database_package_version: '10.11'
- Run the
check-deploy
andsetup-everything
playbooks to upgrade the databases to MariaDB 10.11.
cd /opt/opsview/deploy
./bin/opsview-deploy lib/playbooks/check-deploy.yml
./bin/opsview-deploy lib/playbooks/setup-everything.yml
Note
On RHEL or OL systems, if MariaDB packages are installed from the MariaDB repository instead of the OS repository, running
check-deploy.yml
will fail. The error message will state that MariaDB packages from the MariaDB repository must be removed.For detailed instructions, see Disable the MariaDB repository and remove its packages.
Restore the database backup Copied
Run the following commands on your database host or your orchestrator, depending on where the database is located.
- To restore the backup of all Opsview databases, start by decompressing the backup file.
gunzip -c /path/to/databases.sql.gz > /path/to/databases.sql
- Restore the databases. The MySQL root user password can be found in the
/opt/opsview/deploy/etc/user_secrets.yml
file.
mysql -u root -p < /path/to/databases.sql
Note
If you encounterERROR: Access to system schema 'mysql' is rejected
, refer to the Error when restoring the MySQL database.
Run setup-monitoring Copied
Note
Before executing this step, ensure that all your databases have been fully restored.
On your orchestrator, run the setup-monitoring
playbook.
cd /opt/opsview/deploy
./bin/opsview-deploy lib/playbooks/setup-monitoring.yml
After completing the step, Apply Changes to submit your database modifications.
Troubleshooting Copied
To help resolve any issues you may encounter during the upgrade, refer to the Database issues troubleshooting documentation.