Changeset 17576 for trunk/DataCheck


Ignore:
Timestamp:
03/01/14 23:59:27 (11 years ago)
Author:
Daniela Dorner
Message:
added feature to run script manually for a certain night, added check if file at isdc exists
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Transfer/BackupRawToWue.sh

    r16992 r17576  
    88
    99set -C
     10
     11# check if only a certain date should be processed
     12#  (feature for manual speedup)
     13if [ "$certaindate" != "" ]
     14then
     15   checkstring=`echo $certaindate | grep -E -o '20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]'`
     16   if [ "$checkstring" = "" ]
     17   then
     18      echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)"
     19      finish
     20   fi
     21   printprocesslog "INFO process only data of "$certaindate
     22   echo "INFO process only data of "$certaindate
     23   specialnight=`echo $certaindate | sed -e 's/\///g'`
     24fi
     25
    1026
    1127# checking that not more than $numrsyncwuelimit
     
    3046   runid=${primaries[$s+$s+1]}
    3147   nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
     48   nightrun=$night"_"`printf %03d $runid`
    3249   
     50   if [ "$specialnight" != "" ]
     51   then
     52      if [ $night -ne $specialnight ]
     53      then
     54         printprocesslog "INFO Treat only "$specialnight" -> continue for "$night
     55         echo "INFO Treat only "$specialnight" -> continue for "$night
     56         continue
     57      fi
     58   fi
     59   
     60   rawdirisdc="/scratch/from_lapalma/raw"
     61   isdcfile=`find $rawdirisdc -type f -regex ".*$nightrun[.]fits[.][fg]z"`
     62   if [ "$isdcfile" == "" ]
     63   then
     64      echo "ERROR Could not find raw file for "$nightrun" on isdc-dl00 - Something is really wrong."
     65      printprocesslog "ERROR Could not find raw file for "$nightrun" on isdc-dl00 - Something is really wrong."
     66      continue
     67   else
     68      filename=`basename $isdcfile`
     69   fi
     70
     71   rawfileisdc=$rawdirisdc"/./"$nightpath"/"$filename
     72   rawdirwue="/fact/raw/"
     73
    3374   setstatus "start"
    3475   if [ $numchanged -eq 0 ]
     
    3879   fi
    3980
    40    rawdirisdc="/scratch/from_lapalma/raw"
    41    rawfileisdc=$rawdirisdc"/./"$nightpath"/"$night"_"`printf %03d $runid`".fits.gz"
    42    rawdirwue="/fact/raw/"
    43 
    4481   printprocesslog "INFO rsync rawfile "$rawfileisdc" to Wue "$rawdirwue
    4582   #rsync -rltDvR --partial --stats --password-file=/home_nfs/isdc/fact_opr/rsync.pwd factdata@161.72.93.131::$rawfilelp $rawdirisdc >> $logfile 2>&1
     83   #echo "rsync -avxR --no-p --stats -T $rsynctempdir $rawfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1"
    4684   rsync -avxR --no-p --stats -T $rsynctempdir $rawfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1
    4785   check1=$?
     
    5997   if [ $numdrs -gt 0 ]
    6098   then
    61       drsfileisdc=$rawdirisdc"/./"$nightpath"/"$night"_"`printf %03d $runid`".drs.fits.gz"
     99      drsfileisdc=$rawdirisdc"/./"$nightpath"/"$nightrun".drs.fits.gz"
    62100      printprocesslog "INFO rsync rawfile "$drsfileisdc" to Wue "$rawdirwue
    63101      rsync -avxR --no-p --stats $drsfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1
Note: See TracChangeset for help on using the changeset viewer.