#!/bin/bash ################################################################################ # Program: lawbu.sh # Preconditions: None # Usage: lawbu.sh # Description: Dumps Lawson DB to Text File for Backup # Date: 2002-06-11 # Author: John Eisenschmidt # Change Log: 2002-06-11 - Created # 2002-06-24 - Changed profile source # 2002-07-18 - Using Oracle exp now # 2002-08-05 - fixed a problem where ORACLE_SID not set # 2002-08-05 - log the output of backup job ################################################################################ # # Setup Variables for this shell script export BUDIR=/apps/lawson/backup export BULOG=/var/adm/lawbu.log export DATE=`date "+%Y-%m-%d"` export ORACLE_SID=`echo ${1} | /usr/bin/tr "[:lower:]" "[:upper:]"` export PWFILE=/etc/orasys.crypt # # Source the Lawson Profile . /etc/profile # # Run Lawson Export Program #expsysdb $1 ${BUDIR}/${DATE}-${1}.dmp # # Run the Oracle exp program exp sys/`crypt key < ${PWFILE}` compress=y full=y file=${BUDIR}/${DATE}_${1}.dmp log=${BULOG} # # gzip the export file gzip ${BUDIR}/${DATE}_${1}.dmp