[Glass] startGemStoneBackup.sh configuration

Dario Trussardi via Glass glass at lists.gemtalksystems.com
Fri May 22 07:46:56 PDT 2015


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}'
%



More information about the Glass mailing list