{"id":325,"date":"2009-05-12T17:07:53","date_gmt":"2009-05-12T11:07:53","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=325"},"modified":"2016-01-07T11:31:12","modified_gmt":"2016-01-07T05:31:12","slug":"did-you-backup-the-database-part-1","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=325","title":{"rendered":"Did you backup the database ?? &#8211; Part 1"},"content":{"rendered":"<p>How often does we find out we haven&#8217;t backed up a database ? \u00c2\u00a0I 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. \u00c2\u00a0I wrote a script that will work only <span style=\"text-decoration: underline;\"><strong>for DB2 UDB V9.0 and up<\/strong><\/span> that checks whether a successful backup was run within the last 12 hrs. The script however will not check whether the media still\u00c2\u00a0exists\u00c2\u00a0nor 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&#8217;t find any backup , it will email a warning email. \u00c2\u00a0You can also exclude certain database from the check using the exclude file. \u00c2\u00a0Check out the script and use it after customizing to your environment and let me know how it goes. Here is the script :\u00c2\u00a0<a href=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2009\/05\/drbkchk_v9.zip\"><span style=\"color: #000000; text-decoration: none;\">\u00c2\u00a0<\/span><\/a><a href=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2009\/05\/drbkchk_v9.zip\">DR Backup Check<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How often does we find out we haven&#8217;t backed up a database ? \u00c2\u00a0I 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[3],"tags":[85,193,943,192,198,194,195,199,197,196],"class_list":["post-325","post","type-post","status-publish","format-standard","hentry","category-db2","tag-backup","tag-check-backup","tag-db2","tag-db2-backup","tag-db_history","tag-dr","tag-list-history","tag-successful-backup","tag-sysibmadm","tag-sysibmadmdb_history"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=325"}],"version-history":[{"count":2,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":1543,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions\/1543"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}