---
title: "Upgrade to MariaDB 10.11"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/6.11.7/prerequisites/compatibility-matrix/upgrade-mariadb-10-11/index.html"
---
## Prerequisites

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](https://docs.itrsgroup.com/docs/opsview/6.11.7/prerequisites/compatibility-matrix/supported-databases/index.html#supported-databases).

## Back up Opsview databases and configuration


**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](https://docs.itrsgroup.com/docs/opsview/6.11.7/upgrade-notes/overview/index.html#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](https://docs.itrsgroup.com/docs/opsview/6.11.7/troubleshooting/database-issues/index.html#disable-the-mariadb-repository-and-remove-its-packages).

## Upgrade to MariaDB 10.11

On your orchestrator, do the following steps:

1. Add the following configuration to the `user_vars.yml` file.

  ```
  opsview_database_package_vendor: 'mariadb'
  opsview_database_package_version: '10.11'
  ```

2. Run the `check-deploy` and `setup-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](https://docs.itrsgroup.com/docs/opsview/6.11.7/troubleshooting/database-issues/index.html#disable-the-mariadb-repository-and-remove-its-packages).



## Restore the database backup

Run the following commands on your database host or your orchestrator, depending on where the database is located.

1. 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
  ```

2. 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 encounter `ERROR: Access to system schema 'mysql' is rejected`, refer to the [Error when restoring the MySQL database](https://docs.itrsgroup.com/docs/opsview/6.11.7/troubleshooting/database-issues/index.html#error-when-restoring-the-mysql-database).



## Run setup-monitoring


**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](https://docs.itrsgroup.com/docs/opsview/6.11.7/configuration/apply-changes/index.html) to submit your database modifications.

## Troubleshooting

To help resolve any issues you may encounter during the upgrade, refer to the [Database issues](https://docs.itrsgroup.com/docs/opsview/6.11.7/troubleshooting/database-issues/index.html) troubleshooting documentation.


