1833781 Members
2641 Online
110063 Solutions
New Discussion

Transfer of files

 
SOLVED
Go to solution
mehul_3
Regular Advisor

Transfer of files

Hi there!
I don't know how to use rcp.
e.g I want to configure a standby database at remote site and I want to transfer a datafiles from u01/gdbs from srsux001(host name) to ahsux001(host name) at remote site in other city.So how to transfer this files in bin mode using rcp

Mehul
6 REPLIES 6
harry d brown jr
Honored Contributor
Solution

Re: Transfer of files

rcp on anything but windows is always binary transfer.

rcp -rp srsux001:/u01/gdbs ahsux001:/u01

man rcp

live free or die
harry d brown jr
Live Free or Die
Steven E. Protter
Exalted Contributor

Re: Transfer of files

Since you now know how to use rcp, the same syntax will work with scp

scp is secure copy without the danger of clear text passwords going back and forth.

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

You can even go password free. See attachment.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
G. Vrijhoeven
Honored Contributor

Re: Transfer of files

Hi Mehul,

I would look into scp but rcp works like this.

srsux001( source)
ahsux001 ( destination)

make sure a the user exists on both nodes.
create a .rhosts file in the homedir of user
put one line in there
srsux001 username

Where srsux001 must be resolvable.
the right on the .rhosts file can be chmod 600 /homedir/.rhosts

to copy interactive on serverA
rcp -p ahsux001:/u01/gbds /targetdir

check man .rhosts and man rcp

default the rtools are enabled in the inetd.conf

HTH,

Gideon

HTH,

Gideon
Geoff Wild
Honored Contributor

Re: Transfer of files

You may also want to look at rdist:

rdist facilitates the maintaining of identical copies of files over
multiple hosts. It preserves the owner, group, mode, and modification
time of files if possible and can update programs that are executing.

How I do it:

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 vgpadm up-to-date.
# Currently the files are in:
#
# /home/ipradm/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
( 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.
Ivajlo Yanakiev
Respected Contributor

Re: Transfer of files

Using rcp is securety risk. Use scp instead.
But if you still want use rcp, edit /.rhosts and add remoute host.
Bharat Katkar
Honored Contributor

Re: Transfer of files

mehul you have not assigned points to any of the responses you got.
To know about rewarding points go to the link below:
http://forums1.itrc.hp.com/service/forums/helptips.do?admit=716493758+1085211538437+28353475#33
Regards,


You need to know a lot to actually know how little you know