Changeset 18746
- Timestamp:
- 02/04/17 16:41:48 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Transfer/BackupQLA.sh
r18709 r18746 12 12 set -C 13 13 14 logfile=$runlogpath"/BackupQLA-"$datetime".log" 15 date > $logfile 16 17 if [ "$1" = "short" ] 18 then 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 22 fi 23 24 25 14 26 # get paths depending on host 15 27 case $HOSTNAME in 16 daq) from=( "/loc_data/analysis /" )28 daq) from=( "/loc_data/analysis" ) 17 29 to=( "/newdaq/analysis_bu" ) 18 30 ## new temporary solution with rsync-servers 19 31 #to="newdaq::newdaq/analysis_bu" 20 32 ;; 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" ) 22 34 #to="/gpfs/scratch/fact/qla" 23 35 to=( "/gpfs0/fact/processing/qla" "operator@coma.astro.uni-wuerzburg.de:/fact/data/qla") … … 29 41 esac 30 42 31 logfile=$runlogpath"/BackupQLA-"$datetime".log" 32 date >> $logfile 43 33 44 34 45 for (( i=0 ; i < ${#from[@]} ; i++ )) 35 46 do 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 ] 39 48 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 42 71 fi 43 72 done
Note:
See TracChangeset
for help on using the changeset viewer.