[Glass] Cron script
Trussardi Dario Romano via Glass
glass at lists.gemtalksystems.com
Sat Mar 12 06:55:27 PST 2016
Ciao,
i have the following script call by Cron service.
# set up stone environment
export GS_HOME=/opt/oodb/gsDevKitHome
stonePath=$GS_HOME/gemstone/stones/gestionale
pushd $stonePath >& /dev/null
source $stonePath/stone.env
popd >& /dev/null
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}/backups/${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 emptyLog
%
commit
run
(ObjectLogEntry trace: 'BACKUP: begin ' object: '${backupfile}') addToLog.
%
commit
run
| id |
id := SystemRepository startNewLog.
[ id < 0 ] whileTrue: [
System sleep: 1.
id := SystemRepository startNewLog ].
SystemRepository fullBackupTo: '${backupfile}'
%
begin
run
(ObjectLogEntry trace: 'BACKUP: completed ' object: '${backupfile}') addToLog.
%
commit
logout
quit
.................
.................
..............
First questions is relative to topaz call.
When this script call the topaz it required a netldi service run on the server ?
If yes it required a specific netldi port ?
How the system manage this link?
If i launching a direct topaz session i need to define the netldi port with : set gemn !tcp at scandella#netldi:50xxx#task!gemnetobject
Second question:
My environment use the default Seaside maintenance VM.
Now the script, before the backup, call:
run
ObjectLogEntry emptyLog
%
commit
It's correct ?
I think the backup is cleaned without Object entry.
Or the system required a markForCollect cycle before ?
Thanks for any considerations,
Dario
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20160312/5e8e5c04/attachment.html>
More information about the Glass
mailing list