source: trunk/DataCheck/RsyncAux.sh@ 12569

Last change on this file since 12569 was 12561, checked in by Daniela Dorner, 13 years ago
minor changes
  • Property svn:executable set to *
File size: 675 bytes
Line 
1#!/bin/bash
2
3date=`date +%Y/%m/%d --date="-1day"`
4
5today=`date +%F`
6logfile=/home/`whoami`/DataCheck/log/RsyncAux$today.log
7
8auxdir=loc_data/aux/$date
9echo "" >> $logfile 2>&1
10echo "" >> $logfile 2>&1
11echo "" >> $logfile 2>&1
12echo `date`": processing files in "$auxdir >> $logfile 2>&1
13
14hour=`date +%k`
15if [ $hour -lt 8 ] || [ $hour -gt 18 ]
16then
17 bwlimit="--bwlimit=2000"
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::$auxdir /$auxdir >> $logfile 2>&1
25then
26 echo `date`": problem rsyncing auxiliary data from daq to data"
27fi
28
29
Note: See TracBrowser for help on using the repository browser.