#!/bin/sh

#############################################################
# Author : steve gilbert
#         
# Purpose: Script to backup /iodprod
#          
# History: Feb 24, 2003 - First Implemented into production
#          Nov 2006     - Modified for Mist and Dew 
#                         Changed rsh to ssh
#############################################################

set -x

borw=$(hostname | cut -c 1)

if [ $borw = 'c' ] 
then
   iodhost=140.90.226.205
   export machine=cirrus
elif [ $borw = 's' ] 
then
   iodhost=192.58.3.205
   export machine=stratus
else
   echo " Current host not recognized."
   err_exit;
fi

#
#  Must run on a node where the /iodprod filesystem
#  is mounted.
#
ssh $iodhost ". ~/.profile; env PDYm1=$PDYm1 machine=$machine DATA=$DATA $USHrhist/rhist_savedecode.sh"
export returned_err_code=$?
exit $returned_err_code
 
