Restoring Data from the Backup


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

S.No Utility Path Database Purpose

BackupDB.bat (for windows) (for linux)

<OpUtils Home>\bin\backup       MSSQL | PGSQL This utility does a backup of the complete database, viz., performance and configuration data.

BackupDB.bat -mode configdata (for windows) -mode configdata (for linux)

<OpUtils Home>\bin\backup       MSSQL | PGSQL Use this tool if you want to backup only the configuration data with this we backup Conf, Images folder and get the details of Devices, Device Templates, Interfaces, Interface Template, Dashboards & Widgets, Infrastructure Views, Business Views, Credentials, Notification Profiles, Users but not the performance data.



To restore the backed up data,

  1. Go to <OpUtils Home>/bin/backup directory
  2. Execute RestoreDB.bat (use for linux) with the backup file name as argument. See example below:
    C:\<OpUtils Home>\bin\backup>RestoreDB.bat "OpUtils\backup\"

To restore the backed up data for MSSQL

  1. Go to <OpUtils Home>/bin/backup directory
  2. Restore the data using RestoreDB.bat present under OpUtils/bin/backup directory and restart OpUtils.

      For ex : C:\<OpUtils Home>\bin\backup>RestoreDB.bat "c:\OpUtils\backup\"

Important Note : If your migrating the database from PostgreSQL or MySQL to MSSQL, please follwo the steps below.

  1. Download the SQL Native Client from the link below. You will need to scroll down the page for the Native Client downloads: Microsoft SQL Server 2008 R2 Native Client (SQL Server Native Client) is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver. It contains run-time support for applications using native-code APIs (ODBC, OLE DB and ADO) to connect to Microsoft SQL Server 2000, 2005, or 2008. SQL Server Native Client should be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2008 R2 features. This redistributable installer for SQL Server Native Client installs the client components needed during run time to take advantage of new SQL Server 2008 R2 features, and optionally installs the header files needed to develop an application that uses the SQL Server Native Client API.                                  

    X86 Package (sqlncli.msi) X64 Package (sqlncli.msi) IA64 Package (sqlncli.msi)

    For more details on installing the native client, refer this site:


  2. Here is a quick video of SQL Native client installation.

  3. Find the files bcp.exe and bcp.rll in MSSQL server and ensure to copy it under oputils home folder. If the MSSQL server is installed on a 64-bit OS, and OpUtils is installed on 32-bit server, the bcp.exe and bcp.rll copied from the MSSQL server will not work on the OpUtils machine. You'll need a 32-bit bcp.exe and bcp.rll.


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

BackupDB.bat/sh: During restoration, all the existing tables are dropped, new tables are created, and the data are restored.

BackupDB.bat/sh -Mode configdata: During restoration, all the existing tables are dropped, new tables are created, and only the configuration data are restored.