Data Backup and Restoration

 

Periodically backing up the database is very essential, as it helps you restore OpManager service back during planned maintenance as well as unplanned mishaps. OpManager database contains performance data and the configuration data. OpManager database contains two types of data:

Performance data: This is the data gathered by OpManager by periodically polling or querying the resources on a monitored device to determine its performance. This includes resources like CPU, Memory, Response time, Traffic etc.

Configuration data: There are quite a few configurations an administrator effects in OpManager for easy management and monitoring. The configurations include user settings, details of discovered devices, custom monitors, threshold settings, notification profiles, etc. Most configuration data is persisted in the database while a few configurations are written in conf files.  So when you backup configuration data, you must take care to back up the ones you need.


Backup

Following table lists the backup utilities bundled with OpManager and their purpose. Make sure you use the one that fits your backup need:

S.No
Utility
Path
Database
Purpose
1
BackupDB_Mysql.bat/sh
OpManager Home>/bin/backup
MySQL
This utility does a backup of the complete database, viz., performance and configuration data.

If you are using MySQL bundled with OpManager and assuming that you will not switch to MSSQL database when restoring the backed-up data.

Ensures a quick backup.
2
BackupDB_Mysql_Config.bat/sh
-do-
MySQL Use this tool if you want to backup only the configuration data and not the performance data.

This requirement arises when you decide that you want to drop all the performance data and start afresh in the same or new machine, but keep all the configurations alone intact.

Ensures a quick backup.
3
BackupDB.bat/sh
-do- MSSQL/MySQL This utility does a backup of the complete database,  viz., performance and configuration data.

Use this tool if you are using MSSQL as the database. It can also be used for MySQL database besides BackupDB_Mysql.bat/sh, but might take a longer time to backup.

Advantage of using this utility is that you can backup and restore from MySQL to MSSQL and vice versa.
4
BackupDB_Config.bat/sh
-do- MSSQL/MySQL Use this tool if the OpManager database is MSSQL  and if you want to backup only the configuration data and not the performance data.

This requirement arises when you decide that you want to drop all the performance data and start afresh in the same or new machine, but keep all the configurations alone intact.
5
Microsoft SQL Enterprise Manager + BackupConfFiles.bat
-do- MSSQL You can also use Microsoft SQL Enterprise Manager to backup the database.

When you use this tool, make sure to backup the configuration files too using the BackupConfFiles.bat utility because the SQL  Enterprise Manager does a backup of only the database and ignores the configuration files which are required to run OpManager properly.
6
Using third party backup utility + BackupConfFiles.bat
-do- MSSQL/MySQL When you use any third party backup utility, make sure to backup the configuration files too using the BackupConfFiles.bat  utility because the SQL Enterprise Manager does a backup of only the database and ignores the configuration files which are required to run OpManager properly.

Name & Location of the backup files
The backup file created is of the format:  <filename>_<date>_<time>_<build number>.zip

Example: BackUp_APR3_2009_17_43_38_8100.zip.

The backup files are stored under OpManager Home/backup directory. To store the backup file in another directory other than the default directory (<OpManager Home/backup>), follow the procedure below:

  1. Open a command prompt.
  2. From the command prompt, execute the backup script (that meets your requirement) with the path of the destination directory as argument as follows:
    <backup execution command> -destination <path of the destination directory>

    Example:
    BackupDB_Mysql.bat -destination D:\OpManager_backup

Restoration
To restore the backed up data,

  1. Go to <OpManager Home>/bin/backup directory
  2. Execute RestoreDB.bat/sh with the backup file name as argument. See example below:
    C:\<OpManager Home>\bin\backup>RestoreDB.bat BackUp_APR3_2009_17_43_38_8100.zip

While restoring the backup, the tables that are dropped or retained varies according to the backup file restored:

Copyright © 2012, ZOHO Corp. All Rights Reserved.
Network Monitoring Software from ManageEngine