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_ $GS_HOME/bin/todeIt $stoneName bu backup --wait --commit $backupfile >> $GEMSTONE_LOGDIR/${GEMSTONE_ 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_ 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, _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On 02/15/2017 05:14 AM, Mariano
Martinez Peck via Glass wrote:
copydbf is used to validate the backup ... technically, this is only a partial validation, since it does not actually perform the backup itself, but it does ensure that the file is not corrupt ... if copydbf hits an error reading the file, it exits with a non-zero status code: foos:allen_340_e>copydbf info.ston /dev/null GemStone is unable to read the file info.ston foos:allen_340_e>echo $? 3 For the backup, copydbf is invoked with TDGemStoneTool>>copydbf:forFilePath: and the perform on server call used will check the exit status and signal an error and todeIt will exit with a non-zero status if the Smalltalk code throws an error, so your suggested technique will do the trick ... Dale _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |