[Progress Communities] [Progress OpenEdge ABL] Forum Post: Script for enabling/disabling quiet points for snapshots

Status
Not open for further replies.
M

martinz

Guest
Hi, A customer of ours want's to take snapshots occassionaly (not to replace their DR, we have backups, AI and replication in place). We'll be implementing this on their test-environment first. I know we need to enable a quiet point before and disable it after taking the snapshot, and I know we can do that from the pre-freeze-script an pre-thaw-script. Is anyone willing to share their script(s)? I'd like to learn :) So far, I came up with something the script below, based on a KB entry. -- Martin LOGFILE=~/pre-freeze-script.log DLC=/vcd/progress/dlc115 PATH=$DLC/bin:$PATH WAITTIME=10 TIMEOUT=no QUIETED= proquiet_enable() { DBNAME=$1 SECONDS=0 QUIETED="${QUIETED} $1" echo "Requesting quiet point for $1..." >> ${LOGFILE} proquiet ${DBNAME} enable >/dev/null 2>&1 ret=$? while [ $ret -ne 0 ] do if [ $SECONDS -gt ${WAITTIME} ] then echo " timed out after ${SECONDS} seconds." >> ${LOGFILE} TIMEOUT=yes return fi sleep 5 >/dev/null 2>&1 echo " retrying..." >> ${LOGFILE} proquiet ${DBNAME} enable >/dev/null 2>&1 ret=$? done } for i in $* do proquiet_enable $i if [ "${TIMEOUT}" == "yes" ] then break fi done if [ "${TIMEOUT}" == "yes" ] then echo "One of the requests timed out, undo al quiet point requests" >> ${LOGFILE} echo "Set quiet points failed, see logs" # Should trigger failure of pre_freeze_script for i in ${QUIETED} do echo " Undo for $i..." >> ${LOGFILE} proquiet $i disable >/dev/null 2>&1 done else echo "All requests succeeded in time." >> ${LOGFILE} fi

Continue reading...
 
Status
Not open for further replies.
Top