The below batch script is used to automate the database backup for both OpenPage and Cognos using DB2.
With the help of this script we can schedule the backup operations and perform the database backup after a specified number of days. This will prevent and save us during high risk occurred due to any data corruptions on the application database.
DB2Backup.bat - This script can be used to backup both OpenPage and Cognos database.
DB2Backup.bat C:\DB2INST2\backup\seaboard\scriptTest COGNOSDB openpage passw0rd db2inst2
Step 1: Copy both these batch files(DB2Backup.bat and db2backupcmd) into the VM server
Step 3: Execute the below command for running the main batch script: to backup OPX database into C:\DB2INST1\backup\seaboard location.
OPX - This is the database name that needs to be backed up.
openpage - This is the database user name
passw0rd - This is the database password.
Step 5: Ensure the backup file is created into the target backup dir (C:\DB2INST1\backup\seaboard)