Last change
on this file since 12576 was 12576, checked in by Daniela Dorner, 13 years ago |
changed to new structure (nfs mount of disk); bugfix
|
-
Property svn:executable
set to
*
|
File size:
907 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 | # raw data directories on data
|
---|
12 | rawdirdaq=/daq/raw/$date/ # /loc_data from daq via nfs on data
|
---|
13 | rawdirdata=/loc_data/raw/$date
|
---|
14 | echo `date`": processing files in "$rawdir >> $logfile 2>&1
|
---|
15 |
|
---|
16 | # get current hour
|
---|
17 | hour=`date +%k`
|
---|
18 | # define bwlimit for rsync depending on the time
|
---|
19 | if [ $hour -lt 8 ] || [ $hour -gt 18 ]
|
---|
20 | then
|
---|
21 | # limit bw for rsync to 20 MB/s during night
|
---|
22 | bwlimit="--bwlimit=20000"
|
---|
23 | echo "rsync data with "$bwlimit >> $logfile 2>&1
|
---|
24 | else
|
---|
25 | # no bw limit during day
|
---|
26 | echo "rsync data without bwlimit" >> $logfile 2>&1
|
---|
27 | fi
|
---|
28 |
|
---|
29 | #rsync from daq to data
|
---|
30 | if ! /usr/bin/rsync -avxHP $bwlimit $rawdirdaq $rawdirdata >> $logfile 2>&1
|
---|
31 | then
|
---|
32 | echo `date`": problem rsyncing rawdata from daq to data"
|
---|
33 | fi
|
---|
34 |
|
---|
35 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.