Did you backup the database ?? – Part 1

How often does we find out we haven’t backed up a database ?  I had an occasion where I went to the DR site just to find out that couple of databases did not have a daily backup because somebody had commented out the cron entry. Luckily I had older backups and the archive logs to rollfoward.  I wrote a script that will work only for DB2 UDB V9.0 and up that checks whether a successful backup was run within the last 12 hrs. The script however will not check whether the media still exists nor the integrity of the backup. I will have those in few days. The script will go through each database on an instance and checks for successful backup on the database history. It will email a report at the end for all the backups it found and if it doesn’t find any backup , it will email a warning email.  You can also exclude certain database from the check using the exclude file.  Check out the script and use it after customizing to your environment and let me know how it goes. Here is the script :  DR Backup Check

About rpillai

I am a technology enthusiasts and love to work with databases and other technology. Learning new things everyday and don't think the path ever ends ...
This entry was posted in db2 and tagged , , , , , , , , , . Bookmark the permalink.