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

Last change on this file since 13864 was 13599, checked in by Daniela Dorner, 13 years ago
changed time range for rsync of aux files from 3 to 9 days
  • Property svn:executable set to *
File size: 1.5 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 last 3, 6 or 9 nights
13dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
14 `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
15 `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
16 )
17
18# do rsync for rawfiles of these dates
19for date in ${dates[@]}
20do
21 echo "" >> $logfile 2>&1
22 # auxiliary data directories
23 auxdirisdc=/scratch/from_lapalma/aux/./$date/
24 auxdirwue=/fact/aux
25
26 if ! [ -d $auxdirisdc ]
27 then
28 printprocesslog "INFO "$auxdirisdc" not available." >> $logfile 2>&1
29 continue
30 fi
31 printprocesslog "INFO processing files in "$auxdirisdc >> $logfile 2>&1
32 echo `date`": processing files in "$auxdirisdc >> $logfile 2>&1
33
34 #rsync from ISDC to Wue
35 if ! rsync -rltDvR --stats $auxdirisdc operator@coma.astro.uni-wuerzburg.de:$auxdirwue >> $logfile 2>&1
36 then
37 printprocesslog "WARN problem rsyncing auxiliary data for "$date" from ISDC to Wue"
38 echo `date`": problem rsyncing auxiliary data for "$date" from ISDC to Wue" >> $logfile 2>&1
39 echo `date`": problem rsyncing auxiliary data for "$date" from ISDC to Wue"
40 fi
41done
42
Note: See TracBrowser for help on using the repository browser.