- Backup and Restore Guide
- Restoring Backup
- Restore Procedure for Backup Created Using Strategy 2
- Restoring MySQL
Restoring MySQL
This section provides instructions on the procedure required for restoring the backup of Session Monitor's MySQL Data.
MySQL backup will be present in your new Session Monitor server in
the Backup Path provided in the MySQL Backup procedure.
- This step is required only if the node type is Mediation Engine
- Run this command to take a MySQL dump of the blocks table of the newly
installed Session Monitor Server:
mysqldump vsp blocks > blocks_dumps.sql
- Copy this
blocks_dumps.sql
file to your existing MySQL backup directory. - Go to the MySQL Backup directory. For example,
cd /root/ocsmBackup/mysqlBackup
, where thevsp.dump
folder is present, and execute the following command:sed -i 's/PRIMARY KEY (`id`,`template_name`)/PRIMARY KEY (`id`,`template_name`),\n UNIQUE KEY (`id`)/' vsp.dump/vsp@kpi_template_type.sql
OR
Manually edit thevsp.dump/vsp@kpi_template_type.sql
file:- Add a comma at the end of the text "PRIMARY KEY (`id`,`template_name`)"
- Add "UNIQUE KEY (`id`)" text in the next line as shown here in the image;
- From the MySQL backup directory, run the following command and make
sure that the "UNIQUE KEY (`id`)" is present in the
vsp.dump/vsp@kpi_template_type.sql
file after the "PRIMARY KEY (`id`,`template_name`)" text, as shown in the image Figure 4-3:cat vsp.dump/vsp@kpi_template_type.sql
Figure 4-3 vsp.dump/vsp@kpi_template_type.sql
- Run this command to take a MySQL dump of the blocks table of the newly
installed Session Monitor Server:
- Install the mysql-shell utility on the newly installed Session Monitor
Server.
- Go to the folder where you extracted the OCSM Zip bundle
(
ocsm-6.0.0.0.0-GA.zip
) during the Session Monitor installationTheMySQL 8.4.4 shell utility rpm
is packed as a part of the OCSM Zip bundle underother_files/mysql-shell-commercial-8.4.4-1.1.el8.x86_64.rpm
. - Move to the
other_files
directory:cd other_files/
- Install the
mysql shell rpm
by running the following command:yum install mysql-shell-commercial-X.X.XX-X.X.XXX.x86_64.rpm
For example:yum install mysql-shell-commercial-8.4.4-1.1.el8.x86_64.rpm
Note:
Themysql-shell rpm
used here is based on the MySQL 8.4.4 used in the Session Monitor Release 6.0.
- Go to the folder where you extracted the OCSM Zip bundle
(
- Copy the password from
/root/.my.cnf
and keep it handy.Figure 4-4 Copy Password