[Glass] How to hook on tODE backup verification?

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Wed Feb 15 05:14:07 PST 2017


Hi Dale,

I have a bash script that takes care of my stone backups. In a part of such
a script I do:


echo "`date` ------------------------ Starting backup of ${GEMSTONE_NAME}
------------------------" >> $GEMSTONE_LOGDIR/${GEMSTONE_NAME}_backup.log
$GS_HOME/bin/todeIt $stoneName bu backup --wait --commit $backupfile  >>
$GEMSTONE_LOGDIR/${GEMSTONE_NAME}_backup.log 2>&1

The thing is that just after this, I proceed to delete unneeded tranlogs
for the new created backup. So I would delete all extents not needed by
$backupfile. The problem is that this is too risky (delete the tranlogs) if
the backup didn't finish correctly.* I know you do validate the backup in
tODE, but I wonder how can I hook on that answer?  Do you do some kind of
`exit`? *

I was planning to do something like this:

$GS_HOME/bin/todeIt $stoneName bu backup --wait --commit $backupfile  >>
$GEMSTONE_LOGDIR/${GEMSTONE_NAME}_backup.log 2>&1
if [ $? -eq 0 ]
then
  echo "Cool, let's remove tranlogs"
else
  echo "Ups...something was wring with backups...let's skip deleting
tranlogs
fi


Sorry to ask but it's not that easy to reproduce a backup failure hahah.

Thanks in advance,



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170215/74cb50a0/attachment.html>


More information about the Glass mailing list