|
Last change
on this file since 12561 was 12561, checked in by Daniela Dorner, 14 years ago |
|
minor changes
|
-
Property svn:executable
set to
*
|
|
File size:
669 bytes
|
| Line | |
|---|
| 1 | #!/bin/bash
|
|---|
| 2 |
|
|---|
| 3 | date=`date +%Y/%m/%d --date="-1day"`
|
|---|
| 4 |
|
|---|
| 5 | today=`date +%F`
|
|---|
| 6 | logfile=/home/`whoami`/DataCheck/log/RsyncRaw$today.log
|
|---|
| 7 |
|
|---|
| 8 | echo "" >> $logfile 2>&1
|
|---|
| 9 | echo "" >> $logfile 2>&1
|
|---|
| 10 | echo "" >> $logfile 2>&1
|
|---|
| 11 | rawdir=loc_data/raw/$date
|
|---|
| 12 | echo `date`": processing files in "$rawdir >> $logfile 2>&1
|
|---|
| 13 |
|
|---|
| 14 | hour=`date +%k`
|
|---|
| 15 | if [ $hour -lt 8 ] || [ $hour -gt 18 ]
|
|---|
| 16 | then
|
|---|
| 17 | bwlimit="--bwlimit=20000"
|
|---|
| 18 | echo "rsync data with "$bwlimit >> $logfile 2>&1
|
|---|
| 19 | else
|
|---|
| 20 | echo "rsync data without bwlimit" >> $logfile 2>&1
|
|---|
| 21 | fi
|
|---|
| 22 |
|
|---|
| 23 | #rsync from daq to data
|
|---|
| 24 | if ! /usr/bin/rsync -avxHP $bwlimit 10.0.100.12::$rawdir /$rawdir >> $logfile 2>&1
|
|---|
| 25 | then
|
|---|
| 26 | echo `date`": problem rsyncing rawdata from daq to data"
|
|---|
| 27 | fi
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.