#!/bin/bash #This is the main script for SEARCH data management #1) Get the data from each instrument and place # in the working directory tree #2) Generate a check sum for each file #3) Copy the data to the USB disk and then # archive the data to the RAID disk #4) Check the high water mark of the USB and RAID disks # #David Welsh #April 26, 2005 source /home/dataman/.bash_profile #Set the path export PATH=$HOME/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin echo Start Search.bash `date -u` export TZ=GMT0 #Make the data files. #This will be replaced by a script that #gets data from each instrument GetData.bash #Perform data quality checks /home/dataman/IDLcode/SearchDQ.bash #Generate a directory with links to the data archive for #data transfer to Boulder if possible LinkData.bash #Copy necessary PAERI files to outgoing directory PaeriOutgoing.bash #Generate the check sum for the files in the work directory #Echo start and stop here since GenerateCksum.bash is recursive echo " "Start GenerateCksum.bash `date -u` GenerateCksum.bash $HOME/search/work echo " "Stop GenerateCksum.bash `date -u` #Archive the data from the work directory tree #1. copy the data onto the USB disk #2. mv the data onto the RAID search archive ArchiveData.bash #Check the disk usage verses the high water mark for # the current USB disk drive. Switch to the other # USB disk drive if needed. CheckUsbDiskUsage.bash #Check the disk usage verses the high water mark for # the RAID disk drive. #Remove the oldest files in each instrument's directory if needed. #CheckRaidDiskUsage.bash scour echo Stop Search.bash `date -u`