source: trunk/DataCheck/RsyncAux.sh@ 12576

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: 920 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
8echo "" >> $logfile 2>&1
9echo "" >> $logfile 2>&1
10echo "" >> $logfile 2>&1
11# auxiliary data directories on data
12auxdirdaq=/daq/aux/$date/ # /loc_data from daq via nfs on data
13auxdirdata=/loc_data/aux/$date
14echo `date`": processing files in "$auxdir >> $logfile 2>&1
15
16# get current hour
17hour=`date +%k`
18# define bwlimit for rsync depending on the time
19if [ $hour -lt 8 ] || [ $hour -gt 18 ]
20then
21 # limit bw for rsync to 20 MB/s during night
22 bwlimit="--bwlimit=20000"
23 echo "rsync data with "$bwlimit >> $logfile 2>&1
24else
25 # no bw limit during day
26 echo "rsync data without bwlimit" >> $logfile 2>&1
27fi
28
29#rsync from daq to data
30if ! /usr/bin/rsync -avxHP $bwlimit $auxdirdaq $auxdirdata >> $logfile 2>&1
31then
32 echo `date`": problem rsyncing auxiliary data from daq to data"
33fi
34
35
Note: See TracBrowser for help on using the repository browser.