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.
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.
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
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
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.
ecse1 was also known as jaguar when it was a (macosx 10.1.5 box) configuration etc
- Log in automatically as 'smm' on bootup
- see update below
12/2004
UPDATE The crontab below has been replaced by MacAt? scheduler.
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 for user smm has the following:
[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
- The restart-filemaker.sh script stops filemaker, copies files around then restarts filemaker
[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
- osascript runs an applescript - in this case one to quit filemaker
[jaguar:~] smm% cat /Users/smm/Desktop/stop-staffpubs-fp5script
tell application "FileMaker Pro.app"
quit
end tell
- contents of Desktop/start-staff_fp5script which is the script for the compiled script/application /Users/smm/Desktop/start-staffpubs_fp5app
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
mac-g4138-1380:~ Sue$ cat Sue-crontab
# copy the database to ecse1
26 22 * * * /Users/Sue/copydatabasetoecse1.sh
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.
- /Users/Sue/copydatabasetoecse1.sh contains
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
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.
|
| |