Database Cluster Recovery Add-on
The platform has several popular out-of-box clustering options for the MariaDB/MySQL databases, which can be automatically implemented via the auto-clustering feature. Such database clusters offer an advanced high availability and auto-scalability while remaining accessible to any user through automation.
In order to make the solution even more alluring, the platform offers a free diagnostic and recovery add-on to help with database maintenance. Currently, the Database Cluster Recovery add-on supports the following database clusters:
- Primary-Secondary Cluster based on the MariaDB and MySQL stacks
- Primary-Primary Cluster based on the MariaDB and MySQL stacks
- Galera Cluster based on the MariaDB stack
The Database Cluster Recovery add-on can operate in the diagnostic and recovery modes. The first one scans the database to identify if there are any problems, and the second tries to resolve the issue based on the obtained information.
In order to perform required recovery operations, the add-on applies the following adjustments to the database cluster during the installation:
A replica user is added to perform the validation of the clusters. Also, this user is used in the ProxySQL configuration. The credentials can be viewed via the dedicated environment variables:
- REPLICA_USER: repl-xxxxxx
- REPLICA_PSWD: xxxxxxxxxxxx
Also, SSH access is configured between the database nodes (with the dedicated set of SSH keys) to allow data coping with rsync during the restoration procedure.
The add-on is available via the platform Marketplace. Alternatively, you can import the appropriate Database Cluster Recovery package from GitHub.
In the opened confirmation window, provide the required data:
- User and Password - the database admin user credentials
- Environment name - select an environment with the required database cluster from the list
- Nodes - choose a layer with the database cluster
Click Install and wait a few minutes for the add-on to be installed. It will appear in the list of add-ons of the appropriate layer.
The add-on can perform two actions that can be executed by clicking the appropriate buttons:
- Cluster Diagnostic - detects problems with the database cluster (scans if nodes are accessible and databases are consistent)
- Cluster Recovery - tries resolving common problems to restore cluster operability
The result of the Cluster Diagnostic action can be either “Cluster is OK” or “Errors discovered” dashboard notification.
For extended details, you can click the Show Logs button to open the /var/log/db_recovery.log file:
In case some problems are discovered, you can try to resolve them automatically with the Cluster Recovery action. It should handle most of the issues and fully restore cluster operability: