- Our Banner Student System scripts copy the data to /lfs/bbuser - Blackboard is installed in /usr/local/blackboard - The snapshot tool lives in /usr/local/blackboardapps/snapshot (should install by default) - The shell script lives in /usr/local/blackboardapps/snapshot/data - You will need to change the paths, machine name and data source key names in the shell script - You may have to edit snapshot.properties which lives in /usr/local/blackboardapps/snapshot/data - We run on LINUX - Jake Gannon bjjgann@liv.ac.uk The format of the four data files. course.crs External_Course_Key|Course_ID|Course_Name|Available_Ind|Allow_Guest_IND|Catalog_IND 200203|0000000-200203|FOUNDATION AT AFFILIATED INSTITUTION|Y|Y|Y cst.usr System_Role|External_Person_Key|User_ID|Passwd|Firstname|Middlename|Lastname|Email|Email_Ind|Department|B_Phone_1|B_Phone_2|Student_ID|Institution_Role none|340667bjjgann|bjjgann|x|Brian|Jake|Gannon|B.J.J.Gannon@liverpool.ac.uk|Y|Computing Services Department||||Staff course.staff External_Course_Key|External_Person_Key|Role|Available_IND BIOL164200203|338866hhunt|Instructor|Y studs.enr External_Course_key|External_Person_Key|Role CIVD501200203|16605353lisabel|Student ##!/bin/bash #START OF SHELL SCRIPT #CHANGES TO THE CORRECT DIRECTORY cd /usr/local/blackboard/apps/snapshot/data #CHECKS TO SEE IF NEW DATA FILES HAVE BEEN CREATED BY BANNER AND COPIES THEM if test -f /lfs/bbuser/course.crs; then cp /lfs/bbuser/course.crs ./ fi if test -f /lfs/bbuser/course.staff; then cp /lfs/bbuser/course.staff ./ fi if test -f /lfs/bbuser/cst.usr; then cp /lfs/bbuser/cst.usr ./ fi if test -f /lfs/bbuser/studs.enr; then mv /lfs/bbuser/studs.enr ./ fi #THE NEXT LITTLE BIT CREATES A DIRECTORY TO PUT THE DATA FILES WHEN THEY ARE FINISHED WITH #AND CREATES A LOG FILE thedir=`date -I` mkdir $thedir touch $thedir/$thedir.txt echo "If this email is empty that is good news" >> $thedir/$thedir.txt echo "----------------------------------------" >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt #THE ACTUAL SNAPSHOT PROCESSES: THEY ONLY RUN IF THE DATA FILES EXISTS IN THE SAME DIRECTORY AS THE SCRIPT #NOTE DATA SOURCE NAMES AND MACHINE NAMES IN THE COMMANDS if test -f cst.usr; then /usr/local/blackboardapps/snapshot/bin/snapshot_override.sh "-Ddata.source.key=cst.usr" -V blackboard1.liv.ac.uk -f USR_SNPSHT -t /usr/local/blackboardapps/snapshot/data/cst.usr -C /usr/local/blackboardapps/snapshot/data/snapshot.properties mv cst.usr $thedir fi if test -f course.crs; then /usr/local/blackboardapps/snapshot/bin/snapshot_override.sh "-Ddata.source.key=course.crs" -V blackboard1.liv.ac.uk -f CRS_SNPSHT -t /usr/local/blackboardapps/snapshot/data/course.crs -C /usr/local/blackboardapps/snapshot/data/snapshot.properties mv course.crs $thedir fi if test -f course.staff; then /usr/local/blackboardapps/snapshot/bin/snapshot_override.sh "-Ddata.source.key=course.staff" -V blackboard1.liv.ac.uk -f STAFF_SNPSHT -t /usr/local/blackboardapps/snapshot/data/course.staff -C /usr/local/blackboardapps/snapshot/data/snapshot.properties mv course.staff $thedir fi if test -f studs.enr; then /usr/local/blackboardapps/snapshot/bin/snapshot_override.sh "-Ddata.source.key=studs.enr" -V blackboard1.liv.ac.uk -f ENR_SNPSHT -t /usr/local/blackboardapps/snapshot/data/studs.enr -C /usr/local/blackboardapps/snapshot/data/snapshot.properties mv studs.enr $thedir fi #THE REST JUST MOVES THE DATA FILES AND INVALID DATA FILES INTO THE ARCHIVE DIRECTORY MADE EARLIER #IT THEN MAILS ME THE RESULTS if test -f cst.usr.invalid; then echo >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt echo "FAILED CST.USR" >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt cat cst.usr.invalid >> $thedir/$thedir.txt mv cst.usr.invalid $thedir fi if test -f course.crs.invalid; then echo >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt echo "FAILED COURSE.CRS" >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt cat course.crs.invalid >> $thedir/$thedir.txt mv course.crs.invalid $thedir fi if test -f course.staff.invalid; then echo >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt echo "FAILED COURSE.STAFF" >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt cat course.staff.invalid >> $thedir/$thedir.txt mv course.staff.invalid $thedir fi if test -f studs.enr.invalid; then echo >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt echo "FAILED STUDS.ENR" >> $thedir/$thedir.txt echo >> $thedir/$thedir.txt cat studs.enr.invalid >> $thedir/$thedir.txt mv studs.enr.invalid $thedir fi if test -f /usr/local/blackboardlogs/snapshot/bb-services-log-snapshot-jdbc.txt; then mv /usr/local/blackboardlogs/snapshot/bb-services-log-snapshot-jdbc.txt $thedir fi #Mails Errors, I have found this to be a bit unnecessary as errors are due to incorrect data feeds #rather than anything wrong ith the snapshot process. mail -s "Blackboard Update Log" bjjgann < $thedir/$thedir.txt