|
Last change
on this file since 12576 was 12576, checked in by Daniela Dorner, 14 years ago |
|
changed to new structure (nfs mount of disk); bugfix
|
-
Property svn:executable
set to
*
|
|
File size:
920 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/RsyncAux$today.log
|
|---|
| 7 |
|
|---|
| 8 | echo "" >> $logfile 2>&1
|
|---|
| 9 | echo "" >> $logfile 2>&1
|
|---|
| 10 | echo "" >> $logfile 2>&1
|
|---|
| 11 | # auxiliary data directories on data
|
|---|
| 12 | auxdirdaq=/daq/aux/$date/ # /loc_data from daq via nfs on data
|
|---|
| 13 | auxdirdata=/loc_data/aux/$date
|
|---|
| 14 | echo `date`": processing files in "$auxdir >> $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 $auxdirdaq $auxdirdata >> $logfile 2>&1
|
|---|
| 31 | then
|
|---|
| 32 | echo `date`": problem rsyncing auxiliary data from daq to data"
|
|---|
| 33 | fi
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.