Changeset 18746


Ignore:
Timestamp:
02/04/17 16:41:48 (8 years ago)
Author:
Daniela Dorner
Message:
implemented speedup (rsync from/to ISDC took 1.5-2h each)
File:
1 edited

Legend:

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

    r18709 r18746  
    1212set -C
    1313
     14logfile=$runlogpath"/BackupQLA-"$datetime".log"
     15date > $logfile
     16
     17if [ "$1" = "short" ]
     18then
     19   dirs=( "/star" "/callisto" "/ganymed_run" )
     20   printprocesslog "INFO run only short version of rsyncs for the directories "${dirs[@]}
     21   echo "INFO run only short version of rsyncs for the directories "${dirs[@]}  >> $logfile
     22fi
     23
     24
     25
    1426# get paths depending on host
    1527case $HOSTNAME in
    16          daq) from=( "/loc_data/analysis/" )
     28         daq) from=( "/loc_data/analysis" )
    1729              to=( "/newdaq/analysis_bu" )
    1830              ## new temporary solution with rsync-servers
    1931              #to="newdaq::newdaq/analysis_bu"
    2032              ;;
    21    isdc-dl00) from=( "fact@161.72.93.131:/daq/analysis/" "/gpfs0/fact/processing/qla/" )
     33   isdc-dl00) from=( "fact@161.72.93.131:/daq/analysis" "/gpfs0/fact/processing/qla" )
    2234              #to="/gpfs/scratch/fact/qla"
    2335              to=( "/gpfs0/fact/processing/qla"  "operator@coma.astro.uni-wuerzburg.de:/fact/data/qla")
     
    2941esac
    3042
    31 logfile=$runlogpath"/BackupQLA-"$datetime".log"
    32 date >> $logfile
     43
    3344
    3445for (( i=0 ; i < ${#from[@]} ; i++ ))
    3546do
    36    printprocesslog "INFO rsync "${from[$i]}" to "${to[$i]}
    37    echo "rsync from "${from[$i]}" to "${to[$i]} >> $logfile 2>&1
    38    if ! rsync -auv ${from[$i]} ${to[$i]} >> $logfile 2>&1
     47   if [ ${#dirs[@]} -gt 0 ]
    3948   then
    40       printprocesslog "CONNECTION problem rsyncing QLA from "${from[$i]}" to "${to[$i]}
    41       echo `date`": problem rsyncing QLA from "${from[$i]}" to "${to[$i]} >> $logfile 2>&1
     49      for dir in ${dirs[@]}
     50      do
     51         echo "INFO rsync "${from[$i]}$dir"/ to "${to[$i]}$dir
     52         date
     53         printprocesslog "INFO rsync "${from[$i]}$dir"/ to "${to[$i]}$dir
     54         echo "rsync from "${from[$i]}$dir"/ to "${to[$i]}$dir >> $logfile 2>&1
     55         if ! rsync -auv ${from[$i]}$dir"/" ${to[$i]}$dir >> $logfile 2>&1
     56         then
     57            printprocesslog "CONNECTION problem rsyncing QLA from "${from[$i]}$dir"/ to "${to[$i]}$dir
     58            echo `date`": problem rsyncing QLA from "${from[$i]}$dir"/ to "${to[$i]}$dir >> $logfile 2>&1
     59         fi
     60      done
     61   else
     62      echo "rsync from "${from[$i]}"/ to "${to[$i]}
     63      finish
     64      printprocesslog "INFO rsync "${from[$i]}"/ to "${to[$i]}
     65      echo "rsync from "${from[$i]}"/ to "${to[$i]} >> $logfile 2>&1
     66      if ! rsync -auv ${from[$i]}"/" ${to[$i]} >> $logfile 2>&1
     67      then
     68         printprocesslog "CONNECTION problem rsyncing QLA from "${from[$i]}"/ to "${to[$i]}
     69         echo `date`": problem rsyncing QLA from "${from[$i]}"/ to "${to[$i]} >> $logfile 2>&1
     70      fi
    4271   fi
    4372done
Note: See TracChangeset for help on using the changeset viewer.