Re: Archiving
Posted in 1993
In article <16B939B5D.CRAWFD@lexmark.com> CRAWFD@lexmark.com writes: > >I am running Informix Online version 5.0. I would like to set up a backup >schedule to archive my logs to tape nightly and do a level 0 archive on >the weekend. I would like to set this up to run automatically. After >reading the Informix documentation it looks like there has to be an operator >present to run the archives. Is there a way to set up a "cron" job to >make the backups happen automatically?? # @(#) $Revision: 1.0 $ # Created by Ohio State University Graduate School - R. E. Hassler # This routine called by cron at 1:15PM usually on Friday except # for holidays when applicable. # This routine backs up the database raw partition using a program # provided by Informix to do this. cd /users/informix echo "Subject: HP9000 db Raw Partition Backup" > reh.fback echo "\\n" >> reh.fback echo "Start time of backup \\c" >> reh.fback date >> reh.fback echo "\\nSTUDENT - CHECK TABLE INDEXES AND ROWIDS IN INDEX; CHECK TBLSPACE DATA ROWS INCLUDING BITMAPS, REMAINING PAGES AND BLOBS:" > reh.fback1 echo "\\nGRADSCH - CHECK TABLE INDEXES AND ROWIDS IN INDEX; CHECK TBLSPACE DATA ROWS INCLUDING BITMAPS, REMAINING PAGES AND BLOBS:" > reh.fback2 echo "\\nCHECK DATABASE CATALOGS:" > reh.fback3 echo "\\nCHECK TBLSPACE EXTENTS AND CHUNCK EXTENTS:" > reh.fback4 echo "\\nCHECK RESERVED PAGES:" > reh.fback5 /bin/su - informix -c \\ " yes 0 | /la/informix/bin/tbtape -s >> reh.fback; \\ echo '\\nBackup to tape completed \\c' >> reh.fback; \\ date >> reh.fback; echo '\\n' >> reh.fback; \\ /la/informix/bin/tbstat -c > db_config; \\ tbcheck -cI -cD -q student >> reh.fback1 2>&1; \\ tbcheck -cI -cD -q gradsch >> reh.fback2 2>&1; \\ tbcheck -cc >> reh.fback3 2>&1; \\ tbcheck -ce -q >> reh.fback4 2>&1; \\ tbcheck -cr -q >> reh.fback5 2>&1 " > /dev/null 2>&1 cat reh.fback1 reh.fback2 reh.fback3 reh.fback4 reh.fback5 >> reh.fback echo "\\n" >> reh.fback echo "Stop time of backup \\c" >> reh.fback date >> reh.fback mail hassler, vance, < reh.fback > /dev/null 2>&1 #end of shellscript This is probably a little crude but my cron entry runs the above shellscript.