DB2 Backup Script

After three months of my continuous hit’s i am successful in writing a backup shell script . Its really nice feeling you get when your first script is successfully executed and is ready to go to production server
So no wasting time here is what i have written
Here are the things what i have done in this script
  1. Check for the space in the file system
  2. Check if the backup is already taken
  3. Take the backup
  4. Copy the backup taken to another server
  5. Remove the 5 days old backup (According to Retention policy)
And Here Goes the script


 To copy the file from one server to other we need to adopt a concept called password less ssh . Please refer this how to make the transfer between 2 servers without invoking the password
Refer this post for the Crontab scheduling to drop a mail of the output to your INBOX
http://db2administration.blogspot.com/2013/01/how-do-you-cronjob-script-to-mail-it-to.html

Download db2script.sh

No comments:

Post a Comment