Cron script

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cron script

GLASS mailing list
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@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

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Cron script

GLASS mailing list
> First questions is relative to topaz call.
>
> When this script call the topaz it required a netldi service run on the
> server ?

No, because if you run topaz on the same machine as the server, you
can just run topaz and log in.

> 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@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 ?

ObjectLogEntries are persisted and emptyLog just disconnects log
entries. If you have an epoch gc running, it will garbage collect
them, but because you're running a script like here, the log entries
themselves will not be GC'ed.

You have to run markForCollection but then wait for the reclaim as
well (or do reclaimAll).

HTH
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass