Multiple DDM backups are trying to run at the same time causing database corruption in Spectrum (Legacy KB ID CNC TS34519 )

Document ID : KB000051890
Last Modified Date : 14/02/2018
Show Technical Document Details
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

.

Related Issues/Questions:
Multiple DDM backups are trying to run at the same time causing database corruption in Spectrum
When using the post_olb_script to backup the DDM database, the DDM backup is trying to execute while the backup is already running.

Problem Environment:
Spectrum 9.0
Spectrum 9.1
18989089-1

Causes of this problem:
The post_olb_script was modified so that the DDM database would be saved after the online database save has been done.  The problem was that the online backup was configured to run once an hour.  The script is not configured to check and see if there is already a ddm database save that was created that day and if so, to not execute a DDM save again.  The previous save was still running when the next save was being executed which corrupted the DDM database.


(Legacy KB ID CNC TS34519 )