Changeset 13054 for trunk/DataCheck/Transfer/BackupAuxToWue.sh
- Timestamp:
- 03/09/12 22:18:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Transfer/BackupAuxToWue.sh
r13046 r13054 1 1 #!/bin/bash 2 2 3 isdcauxdata=/data00/fact-construction/aux/ 4 wueauxdata=/fact/aux 3 # this script has been written to run on La Palma on the machine data 4 # i.e. paths are only working on this machine 5 5 6 today=`date +%F-%H-%M-%S` 7 logfile=~/DataCheck/log/BackupAuxToWue$today.log 6 source `dirname $0`/../Sourcefile.sh 7 printprocesslog "INFO starting "$0 8 8 9 echo "" >> $logfile 2>&1 10 echo "" >> $logfile 2>&1 11 echo "" >> $logfile 2>&1 12 echo `date`": start rsync of auxiliary data to Wuerzburg" >> $logfile 2>&1 9 logfile=$runlogpath"/RsyncAuxToWue-"$datetime".log" 10 date >> $logfile 13 11 14 #rsync from ISDC to Wue DC 15 if ! /usr/bin/rsync -avxH --no-p $isdcauxdata operator@coma.astro.uni-wuerzburg.de:$wueauxdata >> $logfile 2>&1 16 then 17 echo `date`": problem rsyncing auxiliary data from ISDC ("$HOST") to Wuerzburg" 18 fi 12 # get last 3 nights 13 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` ) 19 14 15 # do rsync for rawfiles of these dates 16 for date in ${dates[@]} 17 do 18 echo "" >> $logfile 2>&1 19 # auxiliary data directories 20 auxdirisdc=/scratch/from_lapalma/aux/./$date/ 21 auxdirwue=/fact/aux 22 23 if ! [ -d $auxdirisdc ] 24 then 25 printprocesslog "INFO "$auxdirisdc" not available." >> $logfile 2>&1 26 continue 27 fi 28 printprocesslog "INFO processing files in "$auxdirisdc >> $logfile 2>&1 29 echo `date`": processing files in "$auxdirisdc >> $logfile 2>&1 30 31 #rsync from ISDC to Wue 32 if ! rsync -rltDvR --stats $auxdirisdc operator@coma.astro.uni-wuerzburg.de:$auxdirwue >> $logfile 2>&1 33 then 34 printprocesslog "WARN problem rsyncing auxiliary data for "$date" from ISDC to Wue" 35 echo `date`": problem rsyncing auxiliary data for "$date" from ISDC to Wue" >> $logfile 2>&1 36 echo `date`": problem rsyncing auxiliary data for "$date" from ISDC to Wue" 37 fi 38 done 20 39
Note:
See TracChangeset
for help on using the changeset viewer.