MySQL Backup
This section details the procedure required for taking a backup of the Session Monitor's MySQL Data.
This section is applicable for taking a backup from Session Monitor with Releases 5.1, 5.2, and 6.0, restoring it on Session Monitor with Release 6.1.
- Installing MySQL shell utility:
- Go to the folder where MySQL RPM files are present. (The MySQL 8 Commercial Package was downloaded from the Oracle software delivery during Session Monitor rpm installation.). cd mysql-8.X/8.X.XX/. For example: cd other_files/.
- Run the following command to install the MySQL shell rpm:
For example:yum install mysql-shell-commercial-X.X.XX-X.X.XXX.x86_64.rpmyum install mysql-shell-commercial-8.0.32-1.1.el8.x86_64.rpmNote:
When you are taking a backup form 6.0:- Go to the folder where you extracted the Session Monitor Zip bundle (ocsm-6.0.0.0.0-GA.zip) during the Session Monitor installation. The MySQL 8.4.6 shell utility rpm is packed as a part of the OCSM Zip bundle under other_files/mysql-shell-commercial-8.4.6-1.1.el8.x86_64.rpm.
- b Move to the other_files directory: cd other_files/.
- Install the mysql shell rpm:
For example:yum install mysql-shell-commercial-X.X.XX-X.X.XXX.x86_64.rpmyum installmysql-shell-commercial-8.4.6-1.1.el8.x86_64.rpm
- Create a temporary directory structure under /root/ or any other location on
your Session Monitor Server where space is available. For example:
mkdir /root/mysqlBackup/. - Copy the password from /root/.my.cnf and keep it handy.
Figure 3-1 Copy Password

- Type
mysqlsh --no-defaultscommand, - Type "\js" to enter JavaScript mode. Run this command in sequence at the JS prompt:
- Run this command to connect to a MySQL instance:
\connect root@localhost:3306 - When prompted for password. paste the password as copied from /root/.my.cnf earlier in Step 3.
- Run this command to begin backup:
util.dumpSchemas(["<DATABASE>"],"<PATH_TO_MYSQL_BACKUP_DIRECTORY>/<DATABASE>.dump",{threads:88})For Mediation Engine, use DATABASE = vsp
For Mediation Engine Connector, use DATABASE = pldmaster
For example, in Mediation Engine:
util.dumpSchemas(["vsp"],"/root/mysqlBackup/vsp.dump",{threads:88})
Once the backup is successful, a message is displayed similar to the below sample:
105% (9.97M rows / ~9.47M rows), 26.82K rows/s, 559.12 KB/s uncompressed, 17.04 KB/s compressed Dump duration: 00:00:52s Total duration: 00:00:54s Schemas dumped: 1 Tables dumped: 63 Uncompressed data size: 260.70 MB Compressed data size: 7.81 MB Compression ratio: 33.4 Rows written: 9970295 Bytes written: 7.81 MB Average uncompressed throughput: 4.93 MB/s Average compressed throughput: 147.71 KB/s - To exit from mysql-shell run this command:
\quit
- Run this command to connect to a MySQL instance:
- Verify a <DATABASE>.dump directory has been created under the directory
created from Step 2. Run this command:
.
Example For Mediation Engine:ls -lh /root/mysqlBackup/[root@localhost ~]# ls -lh /root/mysqlBackup/ total 1.2M drwxr-x---. 2 root root 1.2M Aug 19 13:27 vsp.dump