1823083 Members
3515 Online
109646 Solutions
New Discussion юеВ

rdist usage

 
SOLVED
Go to solution
RHA
New Member

rdist usage

Hi All,

I am migrating data (5 filesystems) on a HPUX 11 server, the source and target areas are NFS mounted on the HP box, from different resources.

I was planning to use rdist to do the initial copy and subsequent incrementals.

I wanted to know if it is possible, just using a command, rather than creating a rdist config file. I have included below my planned script to initiate the copy. Please advise me if this is correct.

rdist -hMRw
rdist -hMRw
rdist -hMRw
etc
etc


Any help would be appreciated.

Thanks
4 REPLIES 4
Michael Schulte zur Sur
Honored Contributor
Solution

Re: rdist usage

Hi,

have a look at this page:
http://docs.hp.com/en/B3921-90010/rdist.1.html
I think you can do it with the -c option.

greetings,

Michael
Devesh Pant_1
Esteemed Contributor

Re: rdist usage

RHA,
I do not see any problem since the source and target are both on the same server after the nfs mount.

However since rdis is for remote distribution, I have always used a distfile and that makes life much easier

If you follow the example in th man page you will easily be able to accomplish what you want.

thanks
DP
Florian Heigl (new acc)
Honored Contributor

Re: rdist usage

I use(d) rdist for my home directory and apparently it definitely *needs* a config file.

If You want a - in my experience - much better too for this job, look at rsync!

(but even cd inpath ; find -depth | cpio -pdm /outpath/ should work better)
yesterday I stood at the edge. Today I'm one step ahead.
Geoff Wild
Honored Contributor

Re: rdist usage

You need a config..

Here's mine for a SAP id on a MC/SG cluster:


First, the cron entry:

# 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 vgpadm 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/vg5* |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" `cat /usr/local/mailadmin.list`
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.