Changeset 7460 for trunk/MagicSoft/Mars/datacenter/scripts/copyscript
- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/copyscript
r7456 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # … … 27 27 # 28 28 # This script handles the subsystem logfiles, which are copied every 29 # day automatically from pc15 in La Palma to /data/MAGIC/transfer/ in30 # Wuerzburg29 # day automatically from /local/ on pc15 in La Palma to 30 # /home/lapalma/transfer/ on coma in the datacenter in Wuerzburg 31 31 # The structure in this directory is: subsystem/date/logfile.* 32 32 # The logfiles are from CC (*.rep, CC*.dbg, CC*.rbk, CC*.rep, CC*.run, 33 # CC*.run.html) and Cosy (cosy*.log, cosy*.rep, tpoint*.txt/starg*.txt) 34 # AMC (AMC*.log, AMC*.info, AMC*.lut) and CaCo (dc*.txt) are not copied 35 # every day automatically 33 # CC*.run.html), Cosy (cosy*.log, cosy*.rep, tpoint*.txt/starg*.txt) 34 # AMC (AMC*.log, AMC*.info, AMC*.lut) and CaCo (dc*.txt) 36 35 # 37 36 # the script performs the following steps: … … 40 39 # using the macros filldotrbk.C and filldotrun.C 41 40 # - copying all logfiles to the correct directory: 42 # /Period*/subsystem/date/file.* 43 # (the period for each date is obtained by the macro getperiod.C) 44 # - filling the sequences for the standard analysis into the database 45 # (for each day of which a file was copied) 46 # 41 # /subsystemdata/subsystem/YYYY/MM/DD/file.* 42 # - building the sequences for the standard analysis in the database 43 # (for each day of which a file was copied) 44 # - if a new catalogfile has been copied, it is installed as standard in the 45 # setup directory /magic/datacenter/setup and the new lines are sent to 46 # the adresses specified in the script 47 47 # 48 48 # -- to make sure that no file is copied twice there's a textfile … … 66 66 transdir=/home/lapalma/transfer 67 67 char=28 68 #extern=MAGIC@virgo:/data/MAGIC/transfer69 68 datetime=`date +%F-%H-%M-%S` 70 69 … … 76 75 date >> $scriptlog 2>&1 77 76 77 # check if the script is already running 78 78 date > $lockpath/lock-copyscript.txt >> $scriptlog 2>&1 79 79 checklock0=$? … … 87 87 esac 88 88 89 # rsync new dc with virgo90 #rsync -av $extern/ $transdir >> $scriptlog 2>&191 92 89 cd $transdir 93 90 94 91 #check the checksums, write output into file 95 92 md5sum -c .checksums | tee $transdir/.check >> $scriptlog 2>&1 96 #md5sum -c $transdir/checksums-test >| $transdir/.check 93 97 94 if ! test -e $transdir/.check 98 95 then … … 113 110 #dates=`ls $transdir/*/ -1 | grep --regexp=20[0-9][0-9]_*[0-1][0-9]_*[0-3][0-9] | grep -v '.tgz'` 114 111 dates=`ls $transdir/*/ -1 | grep --regexp=20[0-9][0-9]_[0-1][0-9]_[0-3][0-9] | grep -v '.tgz'` >> $scriptlog 2>&1 115 116 112 if [ "$dates" = "" ] 117 113 then … … 123 119 124 120 echo "dates found: "$dates >> $scriptlog 2>&1 125 126 121 #loop over dates 127 122 for date in ${dates[@]} … … 138 133 139 134 date2=`echo $date | sed -e 's/_/\//g'` 140 # echo "date2=$date2"141 135 copylogpath=$logpath/copyscript/$date2 142 136 echo "copylogpath: "$copylogpath >> $scriptlog 2>&1 … … 148 142 echo "file: "$file >> $scriptlog 2>&1 149 143 filename=`basename $file` 150 # echo "filename: "$filename151 144 152 145 #check for each file whether it has to be processed … … 179 172 1) echo "checkfillrun=$checkfillrun -> everything ok " >> $scriptlog 2>&1 180 173 echo "-> insert date in SequenceBuildStatus for $date" >> $scriptlog 2>&1 181 # date3=`echo $date | sed -e 's/_/-/g'` 182 # echo "date3=$date3" 174 183 175 checkinsertdate=`root -q -b $macrospath/insertdate.C+\("\"$date\""\) | tee $copylogpath/insertdate-$date-log.txt | grep int | sed -e 's/(int)//'` 184 176 case $checkinsertdate in … … 224 216 225 217 rm -v $transdir/.check >> $scriptlog 2>&1 226 227 #rsync -av $transdir/ $extern >> $scriptlog 2>&1228 #rsync -av --delete $transdir/ $extern >> $scriptlog 2>&1229 218 230 219
Note:
See TracChangeset
for help on using the changeset viewer.