Index: trunk/DataCheck/Transfer/BackupRawToWue.sh
===================================================================
--- trunk/DataCheck/Transfer/BackupRawToWue.sh	(revision 17575)
+++ trunk/DataCheck/Transfer/BackupRawToWue.sh	(revision 17576)
@@ -8,4 +8,20 @@
 
 set -C
+
+# check if only a certain date should be processed
+#  (feature for manual speedup) 
+if [ "$certaindate" != "" ]
+then
+   checkstring=`echo $certaindate | grep -E -o '20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]'`
+   if [ "$checkstring" = "" ]
+   then
+      echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)"
+      finish
+   fi
+   printprocesslog "INFO process only data of "$certaindate
+   echo "INFO process only data of "$certaindate
+   specialnight=`echo $certaindate | sed -e 's/\///g'`
+fi
+
 
 # checking that not more than $numrsyncwuelimit 
@@ -30,5 +46,30 @@
    runid=${primaries[$s+$s+1]}
    nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
+   nightrun=$night"_"`printf %03d $runid`
    
+   if [ "$specialnight" != "" ]
+   then
+      if [ $night -ne $specialnight ]
+      then
+         printprocesslog "INFO Treat only "$specialnight" -> continue for "$night
+         echo "INFO Treat only "$specialnight" -> continue for "$night
+         continue
+      fi
+   fi
+   
+   rawdirisdc="/scratch/from_lapalma/raw"
+   isdcfile=`find $rawdirisdc -type f -regex ".*$nightrun[.]fits[.][fg]z"`
+   if [ "$isdcfile" == "" ]
+   then
+      echo "ERROR Could not find raw file for "$nightrun" on isdc-dl00 - Something is really wrong."
+      printprocesslog "ERROR Could not find raw file for "$nightrun" on isdc-dl00 - Something is really wrong."
+      continue
+   else
+      filename=`basename $isdcfile`
+   fi
+
+   rawfileisdc=$rawdirisdc"/./"$nightpath"/"$filename
+   rawdirwue="/fact/raw/"
+
    setstatus "start" 
    if [ $numchanged -eq 0 ]
@@ -38,10 +79,7 @@
    fi
 
-   rawdirisdc="/scratch/from_lapalma/raw"
-   rawfileisdc=$rawdirisdc"/./"$nightpath"/"$night"_"`printf %03d $runid`".fits.gz"
-   rawdirwue="/fact/raw/"
-
    printprocesslog "INFO rsync rawfile "$rawfileisdc" to Wue "$rawdirwue
    #rsync -rltDvR --partial --stats --password-file=/home_nfs/isdc/fact_opr/rsync.pwd factdata@161.72.93.131::$rawfilelp $rawdirisdc >> $logfile 2>&1
+   #echo "rsync -avxR --no-p --stats -T $rsynctempdir $rawfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1"
    rsync -avxR --no-p --stats -T $rsynctempdir $rawfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1
    check1=$?
@@ -59,5 +97,5 @@
    if [ $numdrs -gt 0 ]
    then 
-      drsfileisdc=$rawdirisdc"/./"$nightpath"/"$night"_"`printf %03d $runid`".drs.fits.gz"
+      drsfileisdc=$rawdirisdc"/./"$nightpath"/"$nightrun".drs.fits.gz"
       printprocesslog "INFO rsync rawfile "$drsfileisdc" to Wue "$rawdirwue
       rsync -avxR --no-p --stats $drsfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1
