Last change
on this file since 13154 was 13054, checked in by Daniela Dorner, 13 years ago |
reworked version of scripts doing backup to Wuerzburg
|
-
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 |
|
---|
6 | source `dirname $0`/../Sourcefile.sh
|
---|
7 | printprocesslog "INFO starting "$0
|
---|
8 |
|
---|
9 | logfile=$runlogpath"/RsyncAuxToWue-"$datetime".log"
|
---|
10 | date >> $logfile
|
---|
11 |
|
---|
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"` )
|
---|
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
|
---|
39 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.