source: trunk/DataCheck/Transfer/BackupAuxToWue.sh@ 19610

Last change on this file since 19610 was 18432, checked in by Daniela Dorner, 9 years ago
implemented usage of variable certaindate
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2
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
6source `dirname $0`/../Sourcefile.sh
7printprocesslog "INFO starting "$0
8
9logfile=$runlogpath"/RsyncAuxToWue-"$datetime".log"
10date >> $logfile
11
12# get dates
13if [ "$certaindate" != "" ]
14then
15 getdates $certaindate
16else
17 # get all night
18 #getdates "all"
19 # get last 9 nights
20 getdates 9
21fi
22
23
24
25# do rsync for rawfiles of these dates
26for date in ${dates[@]}
27do
28 echo "" >> $logfile 2>&1
29 # auxiliary data directories
30 auxdirisdc=/scratch/from_lapalma/aux/./$date/
31 auxdirwue=/fact/aux
32
33 if ! [ -d $auxdirisdc ]
34 then
35 printprocesslog "INFO "$auxdirisdc" not available." >> $logfile 2>&1
36 continue
37 fi
38 printprocesslog "INFO processing files in "$auxdirisdc >> $logfile 2>&1
39 echo `date`": processing files in "$auxdirisdc >> $logfile 2>&1
40
41 #rsync from ISDC to Wue
42 if ! rsync -rltDvR --stats -T $rsynctempdir $auxdirisdc operator@coma.astro.uni-wuerzburg.de:$auxdirwue >> $logfile 2>&1
43 then
44 printprocesslog "CONNECTION problem rsyncing auxiliary data for "$date" from ISDC to Wue"
45 echo `date`": problem rsyncing auxiliary data for "$date" from ISDC to Wue" >> $logfile 2>&1
46 #echo `date`": problem rsyncing auxiliary data for "$date" from ISDC to Wue"
47 fi
48done
49
Note: See TracBrowser for help on using the repository browser.