source: trunk/DataCheck/RsyncRaw.sh@ 12561

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