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
- Check for the space in the file system
- Check if the backup is already taken
- Take the backup
- Copy the backup taken to another server
- Remove the 5 days old backup (According to Retention policy)
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
http://db2administration.blogspot.com/2013/01/how-do-you-cronjob-script-to-mail-it-to.html
Download db2script.sh
No comments:
Post a Comment