Index: trunk/tools/mysql-dump/neb_copy.sh
===================================================================
--- trunk/tools/mysql-dump/neb_copy.sh	(revision 31192)
+++ trunk/tools/mysql-dump/neb_copy.sh	(revision 31212)
@@ -2,6 +2,14 @@
 
 # This script is supposed to be executed on ipp001
+#
+# Its main steps:
+# 1) Copies the MD5 checksum from the ithe host where the nebulous db was dumped 
+#    using neb_dump.sh
+# 2) Copies the nebulous dump
+# 3) Checks the copy agaisnt the checksum
+# In case of failure, an e-mail is sent to $EMAILTO
 
 . /home/panstarrs/ipp/mysql-dump/functions.sh
+EMAILTO=schastel@ifa.hawaii.edu
 
 SOURCE_HOST=ippdb02
@@ -35,4 +43,5 @@
 	if [ "$ITERATION" -ge "$MAX_ITERATIONS" ]; then
                 log ERROR "Copy of $SOURCE/$MD5FILE failed after $ITERATION iterations. Giving up"
+		email "Nebulous MD5 copy failed" $EMAILTO "Copy of $SOURCE/$MD5FILE failed after $ITERATION iterations. Giving up"
 		exit 1
 	fi
@@ -49,4 +58,5 @@
 if [ "$?" -ne "0" ]; then
 	log ERROR "Can't copy nebulous backup file [$FILE_TO_COPY]"
+	email "Nebulous backup file [$FILE_TO_COPY] copy failed" $EMAILTO "Can't copy nebulous backup file [$FILE_TO_COPY]"
 	exit 2
 else
@@ -59,4 +69,5 @@
 if [ "$ACTUAL_MD5SUM" != "$EXPECTED_MD5SUM" ]; then
 	log ERROR "Checksums are different: actual=[$ACTUAL_MD5SUM], expected=[$EXPECTED_MD5SUM]"
+	email "Bad Nebulous checksum" $EMAILTO "Checksums are different: actual=[$ACTUAL_MD5SUM], expected=[$EXPECTED_MD5SUM]"
 	exit 3
 fi
