TWiki home TWiki > ECSEIT > SueG4 TWiki webs:
Main | TWiki | Know | Sandbox
ECSEIT . { Changes | Index | Search | Go }

ECSE Staff and Publications and Units Databases

These run on FileMaker Pro v8.5 Instant web publishing.

ecse1 is the actual server visible to the world.

sue's g4 is her development and the live database content update box. Running filemaker8 pro and hosting the live data.

ecse1 Has been rebuilt as a windows2003 server 27 Jun 2006 . And then updated to filemaker8 jan07.

Feb 2007 update - ecse1 windows server

live database is now the not very friendly filemaker 8.5 instant web publishing. Can't schedule auto quit and restart with latest copy - due to it not always closing properly.

have modified the eheader in staffdb_fm5 to do a redirect to the new version. when sue tells me I'm going to either kill pubs and units or just turn off filemaker 6 entirely.

Currently using port 8000 for fm8.5 IWP to avoid clash. may change that. In all the stuff below refer to ecse-cluster/homedir/admin/it/filemaker for latest versions. sue's box crontab copies directly to cluster address not ecse1 nowadays.

27 Jun 2006 update - using windows box

Sue's G4 has the following smm crontab script in it which copies filemaker files to ecse-cluster:
cat ./copydatabasetoecsecluster1.sh
#!/bin/bash
cd /Users/Sue/Documents/staffdb06

#Should do directory test here, not just the mount command
if ! [ -d /smb/homedir/admin ] ; then
mount_smbfs  //smm:sues-real-password-not-this@ecse-cluster/homedir /smb/homedir ;
fi

for i in `cat danfilelist.txt` ; do /usr/bin/scp $i /smb/homedir/admin/it/filemaker/Latest/ ; done
cd /Users/Sue/Documents/databases
cp EESTUD.lbr /smb/homedir/admin/ugrad/transfer
cp ugrad.df1 /smb/homedir/admin/ugrad/transfer
cp  /smb/homedir/admin/ugrad/studio/* /smb/homedir/admin/ugrad/studio/old
cp  /smb/homedir/admin/ugrad/transfer/* /smb/homedir/admin/ugrad/studio

rsync -a   /Applications/FileMaker\ Pro\ 6\ Folder/Web /smb/homedir/admin/it/filemaker/Web

ecse1 box Scripting

A schedule causes Filemaker to stop and copy the files from temp to live directory before restarting. Still need script to copy directly from sueg4. ecse-cluster has scheduled script (on ecse-srv2 only) to copy from cluster latest to ecse1/data/updates.

This is my FMrestart-script.bat which is run as a daily schedule task at 8:31am on ecse1

#copy files from cluster
#copy ecse-cluster\homedir\admin\it\filemaker\latest\* c:\data\updates\ 

schtasks /end /tn FileMakerProWeb
move /y c:\data\latest\* c:\data\previous
copy /y c:\data\updates\* c:\data\latest

# run filemaker again   
schtasks /run /tn FileMakerProWeb

27 Jun 2006 schtasks scheduler to copy files on windows boxes and start/stop filemaker

See the text and sample batch files in ecse-cluster/homedir/admin/it/filemaker as they contain examples of schtasks start and stop a task (read application) and also copy files to/from other box. I think the copy command may need username/password. Yeah it did as a task.


old stuff

ecse1 was also known as jaguar when it was a (macosx 10.1.5 box) configuration etc

12/2004 ALERT! UPDATE The crontab below has been replaced by MacAt? scheduler.

MacAt Scheduled restart of filemaker

ecse1 runs #MacAt as a cron replacement - as user smm and it starts automatically on the default user login at machine reboot as does FileMaker.

The ecse staff and publications online database runs on jaguar with filemaker 6. I've set up MacAt? to schedule a shutdown (mon-fri mornings starting at 9am, slow restart scedule means that the database should be up again at 9:06 am). It works perfectly every time I try it!!!!!!!!!!! It crashed this morning (using same schedule, just earlier). :( :( It won't crash when I sit in front of the machine and run the MacAt? gui scheduler to stop filemaker, copy files and start filemaker again.

It now occurs to me that the only difference is that the display goes to sleep overnight - I'll go disable that later this morning.

There are a bunch of shell scripts and commands used by MacAt? - In ~smm and ~smm/Desktop The most important script is copyfiles.sh MacAt? uses "~smm/Documents/crontab 29-11-04.mat" - so don't delete that file. actual filename may differ

MacAt? is a sort of cron, which we still have to register and pay for: http://www.macsos.com.au/

Until we register it, if the machine reboots then someone will have to press the 'not yet' button to start the MacAt? application - otherwise it sits at the nag prompt.

The process is: Nightly - 10pm filemaker database files are copied from SMM desktop mac to jaguar. Morning: the script kills filemaker, copies the files from a holding directory to correct location, starts filemaker, opens the two databases staff and pubs.

crontab and assorted scripts that have been tried:

[jaguar:~] smm% cat smm-crontab
# stop filemaker and copy the files from the temp dir then restart filemaker
30 6 * * * /Users/smm/restart-filemaker.sh


[jaguar:~] smm% cat /Users/smm/restart-filemaker.sh
#/bin/bash

/usr/bin/osascript /Users/smm/Desktop/stop-staffpubs-fp5script

cp /Users/smm/staffdata/*  /Users/smm/danbackup/staffdata/

cp /Users/smm/staffdata/new-hold/*  /Users/smm/staffdata/
cp /Users/smm/staffdata/new-hold/pubs_.fp5  /Users/smm/pubsdb/

/Users/smm/Desktop/start-staffpubs_fp5app
[jaguar:~] smm% cat /Users/smm/Desktop/stop-staffpubs-fp5script
tell application "FileMaker Pro.app"
        quit
end tell

tell application "FileMaker Pro"
      activate
end tell
tell application "FileMaker Pro"
  open {file "main:Users:smm:pubsdb:pubs_.fp5"}
  open {file "main:Users:smm:staffdata:Staff_.fp5"}
end tell

sue's G4 mac also has a crontab entry

mac-g4138-1380:~ Sue$ cat Sue-crontab
# copy the database to ecse1
26 22 * * * /Users/Sue/copydatabasetoecse1.sh

sue's G4 mac ssh keys

An ssh key was generated as user [Sue = smm] and stuck in the authorized_keys of smm on ecse1 to allow scp to operate automatically.

mac-g4138-1380:~ Sue$ cat /Users/Sue/copydatabasetoecse1.sh
#!/bin/bash
cd /Users/Sue/Documents/staffdb
for i in `cat danfilelist.txt` ; do /usr/bin/scp $i smm@ecse1.eng.monash.edu.au:
/Users/smm/staffdata/new-hold/ ; done

-- DanGrimm

Topic SueG4 . { Edit | Attach | Ref-By | Printable | Diffs | r1.8 | > | r1.7 | > | r1.6 | More }
Revision r1.8 - 26 Feb 2007 - 04:32 GMT - DanGrimm
Parents: WebHome
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.