Re: Archiving
Posted in 1993
CRAWFD@lexmark.com writes:
: I've got a couple of questions:
:
: 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??
Yes, there is one, we are doing it at our site. the key is to make a shell
script. we are using the follow shell script:
=-=-=-=-=-=-=-=-=-= Begin =-=-=-=-=-=-=-=-=-=
#!/bin/ksh
#
# march 15, 1993. jleon.
#
# Make the informix archive at specific level in the rage of 0 to 2.
#
#
INFORMIXDIR=/usr/local/informix
DAYOFTHEWEEK=`/bin/date +%A`
#
# Determining the level of ARCHIVE. Range [0..2]
#
case $DAYOFTHEWEEK in
Sat) LEVEL=0
;;
Tue|Fri) LEVEL=1
;;
Sun|Mon|Wen|Thu) LEVEL=2
;;
esac
# The following command make an ARCHIVE whitout human intervention
$INFORMIXDIR/bin/tbtape -s << EOT
$LEVEL
EOT
=-=-=-=-=-=-=-=-=-= End =-=-=-=-=-=-=-=-=-=
The only thing you have to do is run this shell script from crontab.
Hope this help...
Regards!
Juan Leon.
:
: I am in the process of getting on the Informix VAR list. If your currently
: on the VAR list and you have some time to answer a few questions could
: you please send me a note directly and I'll get back with you.
:
: Thanks,
: Mark Crawford (606)232-3639
--
Juan Leon Rodriguez Voice: (52-83) 58-2000 ext 4071
ITESM Campus Monterrey Fax : (52-83) 69-2004
Computer Technology Department Internet: jleon@mtecv2.mty.itesm.mx
RS/6000 Systems Support Assistant NeXTMail: jleon@roxette.mty.itesm.mx