[Glass] startGemStoneBackup.sh configuration

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Fri May 22 10:11:58 PDT 2015


Dario,

I think your best bet would be to use the GsDevKitHome 
$GS_HOME/bin/backup script to do the physical backup. The GsDevKitScript 
doesn't currently do a *compressed* backup nor does it do the validation 
of the backup.

So you can replace the line  source `$WE_HOME/defWebEdition` with the 
following script to get the env vars defined:

   stonePath=$GS_HOME/gemstone/stones/$stoneName
   pushd $stonePath >& /dev/null
   source $stonePath/stone.env
   popd >& /dev/null

Dale

On 05/22/2015 07:46 AM, Dario Trussardi via Glass wrote:
> Ciao,
>
> 	i think to use the:	 startGemStoneBackup.sh	 	 from https://github.com/glassdb/webEditionHome/blob/master/bin/startGemStoneBackup.sh
>
> 	to  do the backup of my gsDevKitHome  environment  installed into: 	/opt/oodb/gsDevKitHome$       directory
>
> 	Now i don't understand how i need to define the:		 source $WE_HOME/defWebEdition	  declaration.
>
> 	Now when i run the script the system answer: 	 Missing password file $GEMSTONE/seaside/etc/gemstone.secret
>
>
> 	Thanks for any considerations
>
> 	Dario
>
>
>
>
> #!/bin/bash
> #=========================================================================
> # Copyright (c) 2014 GemTalk Systems, LLC <dhenrich at gemtalksystems.com>.
> #=========================================================================
> #
> # ./startGemStoneBackup runs a GemStone full backup (compressed) and validates
> #  the resulting backup file
> #
> # non-zero exit status if an error occurs during processing
> #
> # logs output to $GEMSTONE_LOGDIR
> #
>
> source $WE_HOME/defWebEdition
>
> if [ -s $GEMSTONE/seaside/etc/gemstone.secret ]; then
>      . $GEMSTONE/seaside/etc/gemstone.secret
> else
>      echo 'Missing password file $GEMSTONE/seaside/etc/gemstone.secret'
>      exit 1
> fi
>
> date=`date +%Y%m%d_%H%M%S`
> backupfile=${GEMSTONE_DATADIR}/${GEMSTONE_NAME}_backup_${date}.dbf
>
> echo "Starting backup: " `date` >> $GEMSTONE_LOGDIR/${GEMSTONE_NAME}_backup.log
>
> cat << EOF | $GEMSTONE/bin/topaz -l -T50000 >> $GEMSTONE_LOGDIR/${GEMSTONE_NAME}_backup.log 2>&1
>
> set user DataCurator pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME
>
> display oops
> iferr 1 where
> iferr 2 stack
> iferr 3 exit 1
>
> login
>
> run
> (ObjectLogEntry trace: 'BACKUP: begin ' object: '${backupfile}') addToLog.
> %
> commit
>
> run
> | id  |
> id := SystemRepository startNewLog.
> [ id < 0 ] whileTrue: [
>    System sleep: 1.
>    id := SystemRepository startNewLog ].
> SystemRepository fullBackupCompressedTo: '${backupfile}'
> %
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150522/6a010a7e/attachment.html>


More information about the Glass mailing list