Ignore:
Timestamp:
08/05/08 12:31:49 (16 years ago)
Author:
snruegam
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles

    r9081 r9091  
    5151ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1
    5252
    53 printprocesslog "INFO moving directories from muxdata to rawdata"
    54 # find directories which have to be copied
    55 days=`find /magic/datacenter/fromtape/muxdata/* -type d`
    56 if [ ! "$days" == "" ]
    57 then
    58    # move directories to the tapedirectory
    59    mv -v $days /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
    60 fi
    61 
    62 # find rawfiles
    63 rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/*data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f`
     53# find rawfiles belonging to tape (don't move files not yet md5-sum checked)
     54rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/???data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f -user tape`
    6455
    6556if [ "$rawfiles" == "" ]
     
    6960fi
    7061
     62# move rawfiles
    7163printprocesslog "INFO moving rawfiles to $datapath/rawfiles"
    7264for rawfile in $rawfiles
     
    7769   if [ "$path" == "datacenter" ]
    7870   then
    79       newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
     71      subpath=`dirname $rawfile | cut -d/ -f5`
     72      newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/'${subpath}'/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
    8073   elif [ "$path" == "data" ]
    8174   then
     
    9386done
    9487
    95 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/*data/* >> $scriptlog 2>&1
     88rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/* >> $scriptlog 2>&1
    9689
    9790printprocesslog "INFO launching filesondisk"
Note: See TracChangeset for help on using the changeset viewer.