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 <[hidden email]>. #========================================================================= # # ./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 [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
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 [hidden email]. #========================================================================= # # ./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 [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Dale,
adding : export GS_HOME=/opt/oodb/gsDevKitHome and:
stonePath=$GS_HOME/gemstone/stones/mystoneName pushd $stonePath >& /dev/null source $stonePath/stone.env popd >& /dev/null It seems all work well. I think to use this script with ubuntu crontab entry What do you think about it ? I'm on the right directions? Thanks for any considerations. Dario
_______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Dario,
Yes cron is the way to go for scheduling regular backups and mfcs... Dale On 5/25/15 6:20 AM, Dario Trussardi via
Glass wrote:
Dale, _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |