Multiple DDM backups are trying to run at the same time causing database corruption in Spectrum

book

Article ID: 51890

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

Multiple DDM backups are trying to run at the same time causing database corruption in Spectrum

Cause

When using the post_olb_script to backup the DDM database, the DDM backup is trying to execute while the backup is already running.

This can occur when running online backup to close together and not giving enough time for the backup of the DDM database.

Environment

Release: Any
Component:

Resolution

You can modify the post olb script to check and see if there is already a DDM save made that day so that it will not execute again:

 

 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

Additional Information

Please reference the "post_olb_script" section of the documentation for more information.