#################################################################################
# This script is used for NIM DB and files synchronization in HA NIM environment
# Author: Radek Ciosk
# This script is used for NIM DB and files synchronization in HA NIM environment
# Author: Radek Ciosk
# Version: 1.0 Date: 27.9.2011
#################################################################################
# Target NIM Server to which synchronize
alternate_master=`lsnim -t alternate_master | awk '{ print $1}'`
# Check if this node is master
if [[ `lsnim -l master | grep is_alternate | awk '{print $3}'` = "yes" ]];then
echo "`hostname` is master NIM server...continuing with synchronization."
else
echo "`hostname` is alternate_master NIM server...nothing to synchronize...exiting."
exit 999
fi
echo "Starting full synchroznization including NIM objects and files in nim FS"
echo `date`
nim -Fo sync -a replicate=yes $alternate_master
RC=$?
echo "Finished full synchroznization with RC=${RC}"
echo `date`
exit $RC
#################################################################################
# Target NIM Server to which synchronize
alternate_master=`lsnim -t alternate_master | awk '{ print $1}'`
# Check if this node is master
if [[ `lsnim -l master | grep is_alternate | awk '{print $3}'` = "yes" ]];then
echo "`hostname` is master NIM server...continuing with synchronization."
else
echo "`hostname` is alternate_master NIM server...nothing to synchronize...exiting."
exit 999
fi
echo "Starting full synchroznization including NIM objects and files in nim FS"
echo `date`
nim -Fo sync -a replicate=yes $alternate_master
RC=$?
echo "Finished full synchroznization with RC=${RC}"
echo `date`
exit $RC
No comments:
Post a Comment