IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31212


Ignore:
Timestamp:
Apr 6, 2011, 4:50:57 PM (15 years ago)
Author:
Serge CHASTEL
Message:

Documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/mysql-dump/neb_copy.sh

    r31192 r31212  
    22
    33# This script is supposed to be executed on ipp001
     4#
     5# Its main steps:
     6# 1) Copies the MD5 checksum from the ithe host where the nebulous db was dumped
     7#    using neb_dump.sh
     8# 2) Copies the nebulous dump
     9# 3) Checks the copy agaisnt the checksum
     10# In case of failure, an e-mail is sent to $EMAILTO
    411
    512. /home/panstarrs/ipp/mysql-dump/functions.sh
     13EMAILTO=schastel@ifa.hawaii.edu
    614
    715SOURCE_HOST=ippdb02
     
    3543        if [ "$ITERATION" -ge "$MAX_ITERATIONS" ]; then
    3644                log ERROR "Copy of $SOURCE/$MD5FILE failed after $ITERATION iterations. Giving up"
     45                email "Nebulous MD5 copy failed" $EMAILTO "Copy of $SOURCE/$MD5FILE failed after $ITERATION iterations. Giving up"
    3746                exit 1
    3847        fi
     
    4958if [ "$?" -ne "0" ]; then
    5059        log ERROR "Can't copy nebulous backup file [$FILE_TO_COPY]"
     60        email "Nebulous backup file [$FILE_TO_COPY] copy failed" $EMAILTO "Can't copy nebulous backup file [$FILE_TO_COPY]"
    5161        exit 2
    5262else
     
    5969if [ "$ACTUAL_MD5SUM" != "$EXPECTED_MD5SUM" ]; then
    6070        log ERROR "Checksums are different: actual=[$ACTUAL_MD5SUM], expected=[$EXPECTED_MD5SUM]"
     71        email "Bad Nebulous checksum" $EMAILTO "Checksums are different: actual=[$ACTUAL_MD5SUM], expected=[$EXPECTED_MD5SUM]"
    6172        exit 3
    6273fi
Note: See TracChangeset for help on using the changeset viewer.