OpManager Backup and Restore for build 9450 and above

OpManager Backup and Restore for build 9450 and above

Question: How to do Backup and Restore for Builds above 9540 

Solution: The backup and restore commands have been changed from build 9450  to 10100 and again from 10200 for different database types, go to <OpManager-Home\bin\backup>  folder and follow the commands below:

Commands for builds above 9450 to 10100:

BackupDB_Mysql.bat/sh
BackupDB_Postgres.bat/sh
CrossDBBackup.bat/sh
RestoreDB.bat/sh


Arguments: mode, destination, exclude, threads

Mode         :To select type of data (Performance and configuration or only configuration).

Example      : -mode all                (to backup both performance and configuration data)
                    -mode configdata     (only  to backup configuration data)

Destination : Specify the location to save the file ( optional ) , without this OpManager stores the  backed up file
                     OpManagerhome/backup folder.

Example       : destination c:\opmanagerbackup

Exclude       :To exclude Plug-in database backups.

Example1      : -exclude netflow            (Excludes Netflow Plug-in  database backup)
Example2      : -exclude ncm                 (Excludes NCM Plug-in database backup)

Threads 
       : ( To speed up the backup process , default count is 10 , can be increased up to 15)

Example         : -threads 12

Mysql database backup :

Windows:                                                                  Linux

BackupDB_Mysql.bat -mode all                                    BackupDB_Mysql.sh -mode all
BackupDB_Mysql.bat -mode configdata                        BackupDB_Mysql.sh -mode configdata
BackupDB_Mysql.bat -mode all -exclude ncm                BackupDB_Mysql.sh -mode all -exclude ncm
BackupDB_Mysql.bat -mode all  -exclude netflow           BackupDB_Mysql.sh -mode all  -exclude netflow     

(Please remember that backup taken using BackupDB_Mysql.bat/sh  can only  be restored with  Mysql database with same build number of OpManager).

Postgres Database backup:

BackupDB_Postgres.bat/sh -mode all
BackupDB_Postgres.bat/sh -mode configdata                   
BackupDB_Postgres.bat/sh -mode all -exclude ncm            
BackupDB_Postgres.bat/sh -mode all  -exclude netflow

(Backup taken using BackupDB_Postgres.bat/sh  can be stored  only with Pgsql database with same OpManager build)

CrossDB backup :


If you want to take backup to migrate Database between PostgreSQL and MSSQL, use the below commands:

CrossDBBackup.bat/sh -mode all -targetdb pgsql                               
CrossDBBackup.bat/sh -mode all -exclude ncm -targetdb pgsql           
CrossDBBackup.bat/sh -mode all -exclude netflow -targetdb pgsql       
CrossDBBackup.bat/sh -mode configdata -targetdb pgsql
CrossDBBackup.bat/sh -mode configdata -threads 12 -destination c:\opmanager -targetdb pgsql                 

CrossDBBackup.bat/sh -mode all -targetdb mssql
CrossDBBackup.bat/sh -mode configdata -targetdb mssql
CrossDBBackup.bat/sh -mode all -exclude ncm -targetdb mssql
CrossDBBackup.bat/sh -mode all -exclude netflow -targetdb mssql
CrossDBBackup.bat/sh -mode configdata -threads 12 -destination c:\opmanager -targetdb mssql

Backup Commands for Builds   10200 and above :


Taking backup from Mysql/pgsql database to  restore it to MSSQL DB :

BackupDB.bat/sh  -mode all -targetdb mssql or BackupDB.bat/sh  -targetdb mssql
BackupDB.bat/sh  -mode configdata -targetdb mssql
BackupDB.bat/sh  -mode all -exclude ncm -targetdb mssql
BackupDB.bat/sh  -mode all -exclude netflow -targetdb mssql
BackupDB.bat/sh  -mode configdata -threads 12 -destination c:\opmanager -targetdb mssql

Taking backup from Mysql/mssql to restore it to  pgsql database:

BackupDB.bat/sh  -mode all -targetdb pgsql or BackupDB.bat/sh  -targetdb pgsql
BackupDB.bat/sh  -mode configdata -targetdb pgsql
BackupDB.bat/sh  -mode all -exclude ncm -targetdb pgsql
BackupDB.bat/sh  -mode all -exclude netflow -targetdb pgsql
BackupDB.bat/sh  -mode configdata -threads 12 -destination c:\opmanager -targetdb pgsql

Taking backup from mysql DB to restore it in mysql DB:

BackupDB.bat/sh -mode configdata
BackupDB.bat/sh -mode all
BackupDB.bat/sh  -mode all -exclude netflow
BackupDB.bat/sh  -mode all -exclude ncm
BackupDB.bat/sh  -mode all -exclude netflow,ncm



Database Restore:  Common for all OpManager builds.

To restore the database , stop OpManager  and use the below command:

RestoreDB.bat/sh <absolute path of the backup file to restore the data backup>

Example:

\\OpManager\bin\backup>RestoreDB.bat "C:\OpManager\backup\BackUp_MAY23_2013_04_40_06_10100.zip"

\\OpManager\bin\backup>RestoreDB.bat "C:\OpManager\backup\BackUpConfigData_MAY23_2013_04_52_14_10100.zip"

(Applicable for both  Opmanager Stand alone and  Enterprise version)

                  New to ADSelfService Plus?