Ignore:
Timestamp:
03/09/12 22:18:35 (13 years ago)
Author:
Daniela Dorner
Message:
reworked version of scripts doing backup to Wuerzburg
File:
1 edited

Legend:

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

    r13046 r13054  
    11#!/bin/bash
    22
    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
    55
    6 today=`date +%F-%H-%M-%S`
    7 logfile=~/DataCheck/log/BackupAuxToWue$today.log
     6source `dirname $0`/../Sourcefile.sh
     7printprocesslog "INFO starting "$0
    88
    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
     9logfile=$runlogpath"/RsyncAuxToWue-"$datetime".log"
     10date >> $logfile
    1311
    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
     13dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` )
    1914
     15# do rsync for rawfiles of these dates
     16for date in ${dates[@]}
     17do
     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
     38done
    2039
Note: See TracChangeset for help on using the changeset viewer.