Restore MySQL InnoDB Cluster from mysqlbackup(MySql Enterprise Backup)

Restore MySQL InnoDB Cluster from mysqlbackup(MySql Enterprise Backup)

Now a days HA(High Availability) and DR(Disaster Recovery) Solutions are mandatory and required for mission critical databases. In MySQL world , HA solution are provided using the InnoDB or NDB Clustering Solution. 

In todays blog , We will discuss about the restoration of the full InnoDB Cluster restoration.

InnoDB MySQL cluster restoration is done in two steps:

1)  Restore MySQL DB Backup on the first node of the Cluster. For that you can check our blog Restore MySQL Database from mysqlbackup.

2) Recreate and Start Cluster.
We will follow below steps for Recreation of MySQL InnoDB Cluster.

2.1) Check if Cluster Admin user existing on the restore node in Step 1

select  User, Host from  user where User like '%cluster%';
 
2.2)  Perform MySQL InnoDB Cluster Prechecks

mysqlsh --log-level=DEBUG3
dba.verbose=2
dba.checkInstanceConfiguration('clusteradmin@mysqlhost01:3306')
dba.checkInstanceConfiguration('clusteradmin@mysqlhost02:3306')
dba.checkInstanceConfiguration('clusteradmin@mysqlhost03:3306')



For node mysqlhost02 & mysqlhost03 prechecks output will be same as that of the above.

2.3) Configure all Cluster node for the MySQL InnoDB.

dba.configureLocalInstance('clusteradmin@mysqlhost01:3306')
dba.configureLocalInstance('clusteradmin@mysqlhost02:3306')

dba.configureLocalInstance('clusteradmin@mysqlhost03:3306')


For node mysqlhost02 & mysqlhost03 MySQL InnoDB Configuration output should be same as above.
After Local node configuration, Recheck all node configuration using below steps:

mysqlsh --log-level=DEBUG3
dba.verbose=2
dba.checkInstanceConfiguration('clusteradmin@mysqlhost01:3306')
dba.checkInstanceConfiguration('clusteradmin@mysqlhost02:3306')
dba.checkInstanceConfiguration('clusteradmin@mysqlhost03:3306')

2.4) Recreate Cluster.

mysqlsh --uri clusteradmin@mysqlhost01:3306
var cluster = dba.createCluster('testdbcluster')


NOTE : If you get error 
"Dba.createCluster: Group Replication failed to start: MySQL Error 3094 (HY000) " with CreateCluster Command then follow our blog.

2.5) Check MySQL InnoDB Cluster Status
var cluster = dba.getCluster()
cluster.status()




2.6) Add Other two node to the cluster using below command.
cluster.addInstance('clusteradmin@mysqlhost02:3306');
cluster.addInstance('clusteradmin@mysqlhost03:3306');



Similarly, Add mysqlhost03 node to cluster. 

2.6) Check MySQL Cluster Status.
cluster.status()



NOTE: If you get error during node addition . Please follow our blog 

 Now, MySQL InnoDB restored completely and successfully.

At this stage , You can try to connect with MySQL InnoDB cluster via MySQL Router. If you are getting any issue you can configure the MySQL Router using our blog Install & Configure MySQL Router -  MySQL InnoDB Cluster 


=========================================================================

You can also , Visit our Blogs for related topic on Backup & Restore:

2)Improve & Optimizing Performance of the MySQL Restore with mysqldump

Comments

Popular posts from this blog

Restore MySQL Database from mysqlbackup

Oracle 19c New Features

Install & Configure MySQL Router - MySQL InnoDB Cluster