#!/bin/bash # This script invokes rman to perform a daily # incremental backup of db # if ARC key is used it makes an archive log backup if a threshold is exceeded # It checks for errors and sends email if any. # It cleans up this script log files older then the log file retention period, Check "set up variables" section. # set up a debug mode ##set -x host_name=$(hostname) opsys=$(uname) script=$(basename $0) if [ ${opsys} = 'Linux' ]; then scriptpath=$(dirname $(readlink -f $0)) else scriptpath=$(dirname $0) fi scriptNoExt=$(echo ${script} | cut -d \. -f 1) paramFilePath=${scriptpath}/${scriptNoExt}.param oraSetFile="${HOME}/.oraset_ss" #---------------- # Functions usage () { echo "Usage: ${script} db_instance_name type_of_backup" echo "Where type_of_backup = [empty|ARC|DELARC|DELBACKUPS]" echo " empty - backup the whole database" echo " ARC - backup and clean up archi...