source: trunk/DataCheck/Transfer/BackupQLA.sh@ 18739

Last change on this file since 18739 was 18709, checked in by Daniela Dorner, 8 years ago
added backup of QLA to Wue
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2#
3# This script does a backup of the QLA results
4# It can be used in different location
5#
6# Be careful: do NOT use --delete as on daq callisto files are deleted
7#
8
9source `dirname $0`/../Sourcefile.sh
10printprocesslog "INFO starting $0"
11
12set -C
13
14# get paths depending on host
15case $HOSTNAME in
16 daq) from=( "/loc_data/analysis/" )
17 to=( "/newdaq/analysis_bu" )
18 ## new temporary solution with rsync-servers
19 #to="newdaq::newdaq/analysis_bu"
20 ;;
21 isdc-dl00) from=( "fact@161.72.93.131:/daq/analysis/" "/gpfs0/fact/processing/qla/" )
22 #to="/gpfs/scratch/fact/qla"
23 to=( "/gpfs0/fact/processing/qla" "operator@coma.astro.uni-wuerzburg.de:/fact/data/qla")
24 # for new rsync: update variables
25 ;;
26 *) echo "no valid host "$HOSTNAME
27 exit
28 ;;
29esac
30
31logfile=$runlogpath"/BackupQLA-"$datetime".log"
32date >> $logfile
33
34for (( i=0 ; i < ${#from[@]} ; i++ ))
35do
36 printprocesslog "INFO rsync "${from[$i]}" to "${to[$i]}
37 echo "rsync from "${from[$i]}" to "${to[$i]} >> $logfile 2>&1
38 if ! rsync -auv ${from[$i]} ${to[$i]} >> $logfile 2>&1
39 then
40 printprocesslog "CONNECTION problem rsyncing QLA from "${from[$i]}" to "${to[$i]}
41 echo `date`": problem rsyncing QLA from "${from[$i]}" to "${to[$i]} >> $logfile 2>&1
42 fi
43done
44
45finish >> $logfile 2>&1
46
Note: See TracBrowser for help on using the repository browser.