Creating DB2 scripts manually
On Windows, the NetBackup for DB2 installation software includes the following scripts:
db2_backup_db_offline.cmd
db2_backup_db_online.cmd
db2_restore_db.cmd
db2_mpp_backup_offline.cmd
db2_mpp_restore_db.cmd
On UNIX, the NetBackup for DB2 installation software includes the following scripts:
db2_backup
db2_restore
db2_all_backup_mpp
db2_all_restore_mpp
After installation, the scripts reside in the following location:
On Windows: install_path\NetBackup\dbext\db2\samples\
On UNIX: /usr/openv/netbackup/ext/db_ext/db2/scripts
Modify these scripts for your environment. Do not store your scripts in the sample directory because they are lost if you upgrade or reinstall. Always relocate your scripts to a safe location. For clustered environments, this location must be available after a failover.
Although each script can have multiple DB2 commands operations, a separate script is required for each type of operation. For example, you need separate scripts for backups and restore.
Note:
Always specify the correct script when configuring automatic backups or when starting operations through NetBackup. NetBackup for DB2 does not generate an error if a restore script is used for a backup operation or a backup script is used for a restore operation.