The following script will backup all databases of a DB2 instance.In an HADR environment , it is useful as the script will bypass the standby servers. It is useful where you don't want to backup the Standby databases , just the Primary databases . A logfile is created . ----------------------CODE-----------START------------------------ #!/bin/bash cd cd bin working_dir=$PWD/logs logfile="BACKUP_DAILY_`date +%d%m%y`.log" touch $working_dir/$logfile >$working_dir/$logfile echo "Current working directory $working_dir" >> $working_dir/$logfile echo "operatation began `date`" >> $working_dir/$logfile for i in `db2 list db directory | grep 'Database name' | awk '{print $4}'`; do echo "==============================" >> $working_dir/$logfile ; echo "beginning backup to TSM for... Read more →