ss_db_filename=$1
compress=$2
backupID=$3
time_string=$4
retval=0
# Do an online save of the DDM database every Sunday.
# The following is an example of the use of this script. If you wish to # enable this functionality, just uncomment the following lines.
day_of_weekNum=`date +%w`
day_of_weekLong=`date +%A`
target_day=( Sunday NO Tuesday NO NO NO NO ) # The Original script only allowed for the Archive Manager backup to be # run once per week and once that day.
# The Script has been modified to only backup the Archive Database once on the specified day.
# The "Target_day" variable represent each day of the week
# upon which you want to run a backup starting with Sunday
# IE: Sunday Monday Tuesday Wednesday Thursday Friday Saturday
# If you want the Database Backed to be backed up on a particular day,
# you would change the entry in the target_day that represents that day
# if you do not want to backup the database the netry should read NO for that day.
# If the Script runs Tuesday it reads the third number in the array
# if they match the backup runs # if they do not match the backup does not run.
if [ ${day_of_weekLong} = ${target_day[${day_of_weekNum}]} ] then
if [ -f $SPECROOT/custom/conf/BackupRun ]
then
retval=$?
else
touch $SPECROOT/custom/conf/BackupRun
cd $SPECROOT/SS/DDM
backup_dir=`dirname $ss_db_filename`
./ddm_backup $backup_dir/db_$time_string.DDMDb > $backup_dir/ddm_backup.log
retval=$?
fi
else
if [ -f $SPECROOT/custom/conf/BackupRun ]
then
rm $SPECROOT/custom/conf/BackupRun
retval=$?
fi
fi
exit $retval