1752633 Members
5899 Online
108788 Solutions
New Discussion юеВ

RDIST tool notify option

 
Vishal Ranjan
Occasional Advisor

RDIST tool notify option

Dear All,

I am using Rdist to replicate some directories from one AIX server (say ukblx157) to another AIX server (say ukapx063).
Rdist tool has a option called notify which sends mail after successfull completion of the replication activity & it also send mail in case of any error.
The problem with it is that the subject line of the alert mail generated is fixed (e.g. Files updated by rdist from ukblx157 to ukapx063)
I want to know is there any way/option to change this?

Regards,
Vishal
2 REPLIES 2
AwadheshPandey
Honored Contributor

Re: RDIST tool notify option

http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V40G_HTML/MAN/MAN1/0305____.HTM

u need to change distfile
It's kind of fun to do the impossible
Geoff Wild
Honored Contributor

Re: RDIST tool notify option

I use rdist - but notify like this:

Root cron:

# Copy prdadm across to the DR site.
05 01 * * * /app/admin/drp/update-binaries.sh



# cat /app/admin/drp/update-binaries.sh
#! /bin/sh

# Keep the DRP copy of the prdadm up-to-date.
# Currently the files are in:
#
# /home/prdadm/DR
#
# See the rdist(1M) distfile for a list of exclusions.

DRPDIR=/app/admin/drp
DRPHOST=svr031

HOST=`/usr/bin/uname -n`
PRD=`cmviewcl |grep prddbci |awk '{print $5}'`
if [ "$HOST" = "$PRD" ]
then
mount | grep /home > /dev/null 2>&1
if [ $? -eq 0 ]
then
for vg in `ls -d /dev/vg6* |awk -F/ '{print $3}'`
do
/usr/sbin/vgexport -p -s -v -m /home/prdadm/DR/$vg.map /dev/$vg
done
cp -p /etc/cmcluster/PRDDBCI/prddbci.cntl /home/prdadm/DR/
cp -p /etc/cmcluster/PRDDBCI/prddbci.cntl.full /home/prdadm/DR/
cp -p /etc/cmcluster/PRDDBCI/prddbci.cntl.mountonly /home/prdadm/DR/
( su - prdadm -c "rdist -f $DRPDIR/distfile prdadm"; ) 2>&1 |\
tee $DRPDIR/drp.log 2>&1 |\
mailx -s "prdadm DRP rdist output" sysadm
fi
fi



# cat /app/admin/drp/distfile
PRDDR = ( svr031 )

#
# File systems to be copied over to the DR host.
# Don't use -R in install - so as not to remove files on destination host
PRDADM = /home/prdadm

prdadm: ( ${PRDADM} ) -> ( ${PRDDR} )
install -w ;



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.